1
0
Fork 0
mirror of https://github.com/datashard/snapshot.git synced 2025-05-21 22:37:21 +00:00
snapshot/cypress/e2e/1.cy.js
2023-03-23 16:49:45 +01:00

41 lines
934 B
JavaScript

/* eslint-env mocha */
/* global cy */
describe("@datashard/snapshot", () => {
context("simple types", () => {
it("works with objects", () => {
cy.fixture("File2").snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Objects",
});
});
it("works with numbers", () => {
cy.wrap(42).snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Numbers",
});
});
it("works with strings", () => {
cy.wrap("foo-bar").snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Strings",
});
});
it(
"works with arrays",
{
env: {
SNAPSHOT_UPDATE: true,
},
},
() => {
cy.wrap([1, 2, 3, 4]).snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Arrays",
});
}
);
});
});