mirror of
https://github.com/datashard/snapshot.git
synced 2024-11-21 13:42:28 +00:00
fixes
This commit is contained in:
parent
4736fb269e
commit
4cb9f8ca1d
3 changed files with 16 additions and 9 deletions
|
@ -3,22 +3,28 @@
|
||||||
describe("@cypress/snapshot", () => {
|
describe("@cypress/snapshot", () => {
|
||||||
context("simple types", () => {
|
context("simple types", () => {
|
||||||
it("works with objects", () => {
|
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", () => {
|
// it("works with numbers", () => {
|
||||||
// console.log(cy.wrap(42))
|
// console.log(cy.wrap(42))
|
||||||
// cy.wrap(42).snapshot();
|
// cy.wrap(42).snapshot();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// it("works with strings", () => {
|
// it("works with strings", () => {
|
||||||
// console.log(cy.wrap("foo-bar"))
|
// console.log(cy.wrap("foo-bar"))
|
||||||
// cy.wrap("foo-bar").snapshot();
|
// cy.wrap("foo-bar").snapshot();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// it("works with arrays", () => {
|
// it("works with arrays", () => {
|
||||||
// console.log(cy.wrap([1, 2, 3]))
|
// console.log(cy.wrap([1, 2, 3]))
|
||||||
// cy.wrap([1, 2, 3]).snapshot();
|
// cy.wrap([1, 2, 3]).snapshot();
|
||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
1
cypress/snapshots/Comparison.json
Normal file
1
cypress/snapshots/Comparison.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"foo":"bar","Fizzy Drink":"Pop"}
|
|
@ -17,7 +17,7 @@ module.exports = {
|
||||||
snapshots: {
|
snapshots: {
|
||||||
compareValues,
|
compareValues,
|
||||||
},
|
},
|
||||||
config: require("./config"),
|
|
||||||
functions: {
|
functions: {
|
||||||
register: require("./functions/register"),
|
register: require("./functions/register"),
|
||||||
tasks: require("./functions/addTasks")
|
tasks: require("./functions/addTasks")
|
||||||
|
|
Loading…
Reference in a new issue