"use strict";

var _default = require("../theme/default");
var _padding = _interopRequireDefault(require("./padding"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
it("renders nothing", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme
  })).toBe("");
});
it("renders padding 0px", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [0]
  })).toBe("padding: 0;");
});
it("renders padding 4px 16px", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [1, 4]
  })).toBe("padding: 4px 16px;");
});
it("renders padding 8px 12px 16px", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [2, 3, 4]
  })).toBe("padding: 8px 12px 16px;");
});
it("renders padding 8px 12px 16px 32px", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [2, 3, 4, 7]
  })).toBe("padding: 8px 12px 16px 28px;");
});
it("renders padding on invalid value 8px auto", function () {
  expect((0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [2, "auto"]
  })).toBe("padding: 8px auto;");
});
it("logs error", function () {
  console.error = jest.fn();
  (0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: "invalid"
  });
  (0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: {}
  });
  (0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: []
  });
  (0, _padding["default"])({
    theme: _default.DefaultTheme,
    padding: [1, 2, 3, 4, 5, 6]
  });
  expect(console.error).toHaveBeenCalledTimes(4);
});