diff --git a/cypress/e2e/spec.cy.js b/cypress/e2e/spec.cy.js index bfed1d6..22362e5 100644 --- a/cypress/e2e/spec.cy.js +++ b/cypress/e2e/spec.cy.js @@ -3,22 +3,28 @@ describe("@cypress/snapshot", () => { context("simple types", () => { it("works with objects", () => { - cy.fixture("File2").snapshot("Compare Files"); + cy.fixture("File2").snapshot( + "Compare Files" + ,{ + snapshotPath: "cypress/snapshots", + snapshotName: "Comparison" + } + ); }); // it("works with numbers", () => { - // console.log(cy.wrap(42)) - // cy.wrap(42).snapshot(); + // console.log(cy.wrap(42)) + // cy.wrap(42).snapshot(); // }); // it("works with strings", () => { - // console.log(cy.wrap("foo-bar")) - // cy.wrap("foo-bar").snapshot(); + // console.log(cy.wrap("foo-bar")) + // cy.wrap("foo-bar").snapshot(); // }); // it("works with arrays", () => { - // console.log(cy.wrap([1, 2, 3])) - // cy.wrap([1, 2, 3]).snapshot(); + // console.log(cy.wrap([1, 2, 3])) + // cy.wrap([1, 2, 3]).snapshot(); // }); }); -}); \ No newline at end of file +}); diff --git a/cypress/snapshots/Comparison.json b/cypress/snapshots/Comparison.json new file mode 100644 index 0000000..323e207 --- /dev/null +++ b/cypress/snapshots/Comparison.json @@ -0,0 +1 @@ +{"foo":"bar","Fizzy Drink":"Pop"} \ No newline at end of file diff --git a/src/utils/index.js b/src/utils/index.js index 012879b..692e901 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -17,7 +17,7 @@ module.exports = { snapshots: { compareValues, }, - config: require("./config"), + functions: { register: require("./functions/register"), tasks: require("./functions/addTasks")