snapshot/cypress/e2e/spec.cy.js

34 lines
784 B
JavaScript
Raw Normal View History

2022-09-09 12:50:44 +00:00
/* eslint-env mocha */
/* global cy */
describe("@cypress/snapshot", () => {
context("simple types", () => {
it("works with objects", () => {
2022-09-13 08:36:59 +00:00
cy.fixture("File2").snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Objects",
});
2022-09-09 12:50:44 +00:00
});
2022-09-13 08:36:59 +00:00
it("works with numbers", () => {
cy.wrap(42).snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Numbers",
});
});
2022-09-09 12:50:44 +00:00
2022-09-13 08:36:59 +00:00
it("works with strings", () => {
cy.wrap("foo-bar").snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Strings",
});
});
2022-09-09 12:50:44 +00:00
2022-09-13 08:36:59 +00:00
it("works with arrays", () => {
cy.wrap([1, 2, 3]).snapshot({
snapshotPath: "cypress/snapshots",
snapshotName: "Arrays",
});
});
2022-09-09 12:50:44 +00:00
});
2022-09-12 14:16:00 +00:00
});