/** * Check out the documentation to see how to write and maintain tests: * @see https://docs.constructor.com/docs/integrating-with-constructor-connect-cli-development-flow#step-3-test-your-templates */ import { executeTemplate, buildFixture, } from "@constructor-io/constructorio-connect-cli"; describe("mapping", () => { it("should map item groups", async () => { const result = await executeTemplate({ type: "mapping", name: "mapping.ts", fixture: buildFixture("mapping", "mapping.json"), }); expect(result.item_groups).toMatchSnapshot(); }); it("should map items", async () => { const result = await executeTemplate({ type: "mapping", name: "mapping.ts", fixture: buildFixture("mapping", "mapping.json"), }); expect(result.items).toMatchSnapshot(); }); it("should map variations", async () => { const result = await executeTemplate({ type: "mapping", name: "mapping.ts", fixture: buildFixture("mapping", "mapping.json"), }); expect(result.variations).toMatchSnapshot(); }); });