import React from "react"; import renderer from "react-test-renderer"; import Loader from "../Loader"; describe("Loader renders correctly", () => { it("with custom class name", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with custom class name wrapper", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); describe("with size variants", () => { it("with XS size", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with SMALL size", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with MEDIUM size", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with LARGE size", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with custom size as number", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); }); describe("with color variants", () => { it("with PRIMARY color", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with ON_PRIMARY color", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with SECONDARY color", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with DARK color", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); }); describe("with visual variants", () => { it("with background", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); }); });