import { getSpacingValue } from "./getSpacingValue";

describe("getSpacingValue", () => {
  describe("given padding is not provided", () => {
    it("should return undefined", () => {
      const input = undefined;

      const actual = getSpacingValue(input);

      expect(actual).toBeUndefined();
    });
  });

  describe("given padding is a string", () => {
    it("should return size variable", () => {
      const input = "xxs";

      const actual = getSpacingValue(input);

      expect(actual).toBe(`var(--size-${input})`);
    });
  });

  describe("given padding is a number", () => {
    it("should return pixel value", () => {
      const input = 10;

      const actual = getSpacingValue(input);

      expect(actual).toBe(`${input}px`);
    });
  });
});
