@constructor-io/constructorio-connect-cli 1.15.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,18 @@
1
1
  /**
2
2
  * Check out the documentation to see how to write and maintain tests:
3
3
  * @see https://docs.constructor.com/docs/integrating-with-constructor-connect-cli-development-flow#step-3-test-your-templates
4
- */
4
+ */
5
+
6
+ import { executeTemplate, buildFixture } from "@constructor-io/constructorio-connect-cli";
5
7
 
6
8
  describe("item", () => {
7
- it("should be defined", async () => {
8
- expect(true).toBe(true);
9
+ it("should match snapshot", async () => {
10
+ const result = await executeTemplate({
11
+ type: "item",
12
+ name: "item.jsonata",
13
+ fixture: buildFixture("item", "item.json"),
14
+ });
15
+
16
+ expect(result).toMatchSnapshot();
9
17
  });
10
18
  });
@@ -1,10 +1,18 @@
1
1
  /**
2
2
  * Check out the documentation to see how to write and maintain tests:
3
3
  * @see https://docs.constructor.com/docs/integrating-with-constructor-connect-cli-development-flow#step-3-test-your-templates
4
- */
4
+ */
5
+
6
+ import { executeTemplate, buildFixture } from "@constructor-io/constructorio-connect-cli";
5
7
 
6
8
  describe("item_group", () => {
7
- it("should be defined", async () => {
8
- expect(true).toBe(true);
9
+ it("should match snapshot", async () => {
10
+ const result = await executeTemplate({
11
+ type: "item_group",
12
+ name: "item_group.jsonata",
13
+ fixture: buildFixture("item_group", "item_group.json"),
14
+ });
15
+
16
+ expect(result).toMatchSnapshot();
9
17
  });
10
18
  });
@@ -1,10 +1,38 @@
1
1
  /**
2
2
  * Check out the documentation to see how to write and maintain tests:
3
3
  * @see https://docs.constructor.com/docs/integrating-with-constructor-connect-cli-development-flow#step-3-test-your-templates
4
- */
4
+ */
5
+
6
+ import { executeTemplate, buildFixture } from "@constructor-io/constructorio-connect-cli";
5
7
 
6
8
  describe("mapping", () => {
7
- it("should be defined", async () => {
8
- expect(true).toBe(true);
9
+ it("should map item groups", async () => {
10
+ const result = await executeTemplate({
11
+ type: "mapping",
12
+ name: "mapping.jsonata",
13
+ fixture: buildFixture("mapping", "mapping.json"),
14
+ });
15
+
16
+ expect(result.item_groups).toMatchSnapshot();
17
+ });
18
+
19
+ it("should map items", async () => {
20
+ const result = await executeTemplate({
21
+ type: "mapping",
22
+ name: "mapping.jsonata",
23
+ fixture: buildFixture("mapping", "mapping.json"),
24
+ });
25
+
26
+ expect(result.items).toMatchSnapshot();
27
+ });
28
+
29
+ it("should map variations", async () => {
30
+ const result = await executeTemplate({
31
+ type: "mapping",
32
+ name: "mapping.jsonata",
33
+ fixture: buildFixture("mapping", "mapping.json"),
34
+ });
35
+
36
+ expect(result.variations).toMatchSnapshot();
9
37
  });
10
38
  });
@@ -1,10 +1,18 @@
1
1
  /**
2
2
  * Check out the documentation to see how to write and maintain tests:
3
3
  * @see https://docs.constructor.com/docs/integrating-with-constructor-connect-cli-development-flow#step-3-test-your-templates
4
- */
4
+ */
5
+
6
+ import { executeTemplate, buildFixture } from "@constructor-io/constructorio-connect-cli";
5
7
 
6
8
  describe("variation", () => {
7
- it("should be defined", async () => {
8
- expect(true).toBe(true);
9
+ it("should match snapshot", async () => {
10
+ const result = await executeTemplate({
11
+ type: "variation",
12
+ name: "variation.jsonata",
13
+ fixture: buildFixture("variation", "variation.json"),
14
+ });
15
+
16
+ expect(result).toMatchSnapshot();
9
17
  });
10
18
  });
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const _default: "1.15.0";
1
+ declare const _default: "1.15.1";
2
2
  export default _default;
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.15.0';
3
+ exports.default = '1.15.1';
@@ -199,5 +199,5 @@
199
199
  ]
200
200
  }
201
201
  },
202
- "version": "1.15.0"
202
+ "version": "1.15.1"
203
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-connect-cli",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "CLI tool to enable users to interface with the Constructor Connect Ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",