UNPKG

@netdata/netdata-ui

Version:
77 lines (76 loc) 1.47 kB
"use strict"; var _default = require("../../../../theme/default"); var _getMarginDimensions = _interopRequireDefault(require("./getMarginDimensions")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } it("renders", function () { ; [{ margin: undefined, dimension: { top: "0", right: "0", bottom: "0", left: "0" } }, { margin: [], dimension: { top: "0", right: "0", bottom: "0", left: "0" } }, { margin: [0], dimension: { top: "0", right: "0", bottom: "0", left: "0" } }, { margin: [1], dimension: { top: "4px", right: "4px", bottom: "4px", left: "4px" } }, { margin: [1, 2], dimension: { top: "4px", right: "8px", bottom: "4px", left: "8px" } }, { margin: [1, 2, 3], dimension: { top: "4px", right: "8px", bottom: "12px", left: "8px" } }, { margin: [1, 2, 3, 4], dimension: { top: "4px", right: "8px", bottom: "12px", left: "16px" } }, { margin: [1, 2, 3, 4, 5], dimension: { top: "0", right: "0", bottom: "0", left: "0" } }].forEach(function (_ref) { var margin = _ref.margin, dimension = _ref.dimension; expect((0, _getMarginDimensions["default"])(_default.DefaultTheme, margin)).toEqual(dimension); }); });