diff --git a/.github/assets/Correct.png b/.github/assets/Correct.png
new file mode 100644
index 0000000..4e93667
Binary files /dev/null and b/.github/assets/Correct.png differ
diff --git a/.github/assets/Error.png b/.github/assets/Error.png
new file mode 100644
index 0000000..5ee573e
Binary files /dev/null and b/.github/assets/Error.png differ
diff --git a/.github/assets/config.png b/.github/assets/config.png
index ede80f5..ae39b13 100644
Binary files a/.github/assets/config.png and b/.github/assets/config.png differ
diff --git a/.npmignore b/.npmignore
index 16a2599..76237e1 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,3 +1,5 @@
cypress/
cypress.config.js
-.github/workflows/
\ No newline at end of file
+.github/workflows/
+.vscode/
+renovate.json
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b22f0b8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2023-2024 Joshua data@shard.wtf
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 1b33e11..6aaec3f 100644
--- a/README.md
+++ b/README.md
@@ -1,55 +1,56 @@
# @datashard/snapshot
-> Adds value / object / DOM element snapshot testing support to Cypress test runner
+> Adds JSON Snapshot comparison to Cypress
-
-Changes between @datashard/snapshot
and @cypress/snapshot
-
-They're mostly the same, as this is a fork of the Latter, though it's not a drop-in replacement.
+## ⚠️ Breaking Changes ⚠️
-Unlike `@cypress/snapshot`, this saves snapshots in their own files with a sensible default and strives to have ongoing Support for future Cypress Versions
+- With V3, the `readFileMaybe` task has been removed, we now rely on `cy.fixture` internally.
+- the previous `SNAPSHOT_UPDATE` Environment/Config Variable has been changed to `updateSnapshots`
-
+> [!DANGER]
+This means that previous tests will likely be broken, *please make sure that your tests pass before updating to the latest version of this Plugin*.
-
+This current release will be released as `3.0.0-beta`, should Bugs be found by me or my Employer, I will open Issues/PRs to fix those, should anyone else find Bugs/Edgecases, etc. please open an Issue.
## Install
-Requires [Node](https://nodejs.org/en/) version 10 or above.
+Requires Node 16 or above
```sh
-npm install --save-dev @datashard/snapshot
+npm i --save-dev @datashard/snapshot
```
## Import
-After installing, you need to add this snippet within your Cypress Support File (default: `cypress/support/e2e.{js,ts}`)
+After Installing, you'll need to add the following import into your Commands/Support File
+
+> by default this will be `cypress/support/e2e.js`
```js
-require("@datashard/snapshot").register();
+require('@datashard/snapshot').regsiter()
```
-This registers a new command to create new snapshot or compare value to old snapshot
+This will register a new Command `.snapshot()`, to create and compare JSON Snapshots.
-and add the following to your `cypress.config.{js,ts}`
+## Config
-```js
- e2e: {
- setupNodeEvents(on, config) {
- require("@datashard/snapshot").tasks(on, config)
- },
-```
+You can pass `updateSnapshots` and `useFolders` as options in the `cypress.config.js` file
+
+![Example Settings for the Module](./.github/assets/config.png)
+Alternatively, you can also add `snapshotUpdate` as an Environment Variable to update your snapshots.
-> **Note** \
-> \
-> `@datashard/snapshot` **requires** the `readFileMaybe` plugin to be included, which can be easily done using the code above
+Simply pass `--env updateSnapshots=true` when running Cypress.
-# Usage
+## Usage
-Currently, if you want to take more than one snapshot, you need to pass a Step Name to prevent overwrites / test failures
+If properly added, usage of this plugin is rather simple, just add `.snapshot()` to cypress functions that return valid JSON. (i.e. `cy.wrap`)
+
+When properly added, you can chain `.snapshot()` off of `cy` functions like `cy.wrap`, just make sure they return valid JSON.
+
+### Example
```js
-describe("my tests", () => {
+describe("my test", () => {
it("works", () => {
cy.log("first snapshot");
cy.wrap({ foo: 42 }).snapshot("foo");
@@ -59,113 +60,33 @@ describe("my tests", () => {
});
```
-In the above case, you can find the stored snapshot in their own files, mentioned above them
-
-```jsonc
-// cypress/snapshots/my-tests-works-foo.json
-{ "foo": 42 }
-// cypress/snapshots/my-tests-works-bar.json
-{ "bar": 101 }
-```
-
-If you change the site values, the saved snapshot will no longer match, throwing an error
-
-(picture taken from `cypress/snapshots/Arrays.json`)
-![Snapshot mismatch](.github/assets/updated-mismatch.png)
-
-Click on the `SNAPSHOT` step in the Command Log to see expected and current value printed in the DevTools.
-
-### Options
-
-You can control snapshot comparison and behavior through a few options.
-
-```js
-cy.get(...).snapshot({
- snapshotName: 'Snapshot Name', // Overwrite the generated Snapshot name
- snapshotPath: 'cypress/not_snapshots', // Overwrite where the Snapshot should be stored
- json: false // convert DOM elements into JSON
-}) // when storing in the snapshot file
-
-// will save as
-// cypress/not_snapshots/Snapshot-Name.json
-```
-
-You can also pass a "Step Name" to the Function
+This Plugin will then save your snapshots as
-```js
-cy.get(...).snapshot("Intercepted API Request")
-// will save as
-// cypress/snapshots/---Intercepted-API-Request.json
-// to prevent duplications
-```
+```ts
+// useFolders: false
+cypress/fixtures/my-test__works__foo.json
+cypress/fixtures/my-test__works__bar.json
-or both
+// useFolders: true
+cypress/fixtures/my-test/works/foo.json
+cypress/fixtures/my-test/works/bar.json
-```js
-cy.get(...).snapshot("Intercepted API Request", {
- snapshotPath: "cypress/snapshots/api",
- snapshotName: "first_intercept"
-})
+// {fixtureFolder}/---.json
+// {fixtureFolder}////.json
-// will save as
-// cypress/snapshots/api/first_intercept.json
```
-### Configuration
-
-This module provides some configuration options:
-
-#### snapshot.snapshotPath
-
-Sets the default Path for saving Snapshots (default: `cypress/snapshots`)
-
-![Config Screenshot](./.github/assets/config.png)
-
-#### `ENV` CYPRESS_UPDATE_SNAPSHOTS
-
-Lets you pass a Env Variable to update failing Tests with the new Data
-
-#
-
-### Small print
-
-Authors:
-
-- Joshua <[data@shard.wtf](mailto:data@shard.wtf)>
-- Gleb Bahmutov <gleb@cypress.io>
-
-
-License: MIT - do anything with the code, but don't blame us if it does not work.
-
-Support: If you find any problems with this module [open an issue](https://github.com/datashard/snapshot/issues) on Github
+Snapshots will generally be saved using this the Convention mentioned in the Comment of the above Codeblock, which is provided by the named Cypress Test Steps.
-## MIT License
+Passing a name to the Snapshot function is required, but not checked, if you want to take multiple snapshots in the same block.
-Copyright (c) 2017-2022 Cypress.io <hello@cypress.io> & Joshua <data@shard.wtf>
+If you have two or more Snapshots in the same Block, the next one ***WILL*** always overwrite the previous one while updating, causing the First Snapshot in the Block to Fail.
+While running your Tests, if a value changed, it will, of course, no longer match the snapshot and throw an Error.
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
+Which will look like this:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+![](./.github/assets/Error.png)
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+When the Test succeeds, it will instead log a Success in the Log and let you know where the File has been saved to, relative to the Fixture Snapshot Folder
-[npm-icon]: https://nodei.co/npm/@datashard/snapshot.svg?downloads=true
-[npm-url]: https://npmjs.org/package/@datashard/snapshot
-[semantic-url]: https://github.com/semantic-release/semantic-release
-[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
-[renovate-app]: https://renovateapp.com/
+![](./.github/assets/Correct.png)
diff --git a/cypress.config.js b/cypress.config.js
index 7c57e27..a006fa4 100644
--- a/cypress.config.js
+++ b/cypress.config.js
@@ -1,13 +1,15 @@
const { defineConfig } = require("cypress");
-const { functions } = require("./src/utils");
module.exports = defineConfig({
+ // fixturesFolder: "cypress/fixtures",
snapshot: {
- snapshotPath: "cypress/snapshots/",
+ // updateSnapshots: true,
+ useFolders: true,
},
+
e2e: {
setupNodeEvents(on, config) {
- functions.tasks(on, config);
+ // implement node event listeners here
},
},
-});
+});
\ No newline at end of file
diff --git a/cypress/e2e/1.cy.js b/cypress/e2e/1.cy.js
index d1dc177..4e3cb70 100644
--- a/cypress/e2e/1.cy.js
+++ b/cypress/e2e/1.cy.js
@@ -1,47 +1,78 @@
/* eslint-env mocha */
/* global cy */
-describe("@datashard/snapshot", () => {
- context("simple types", () => {
- it("works with objects", () => {
- cy.fixture("File2").snapshot({
- snapshotPath: "cypress/snapshots",
- snapshotName: "Objects",
+describe("datashard/snapshot", () => {
+ context("simple types"
+ // , { env: { updateSnapshots: true } }
+ , () => {
+ it("works with objects", () => {
+ cy.wrap({
+ "foo": "bar",
+ "Fizzy Drink": "Pop"
+ }).snapshot();
});
- });
- it("works with numbers", () => {
- cy.wrap(42).snapshot({
- snapshotPath: "cypress/snapshots",
- snapshotName: "Numbers",
+ it("works with numbers", () => {
+ cy.wrap(42).snapshot({
+ snapshotPath: "cypress/fixtures/snapshots",
+ snapshotName: "Numbers",
+ });
});
- });
- it("works with strings", () => {
- cy.wrap("foo-bar").snapshot({
- snapshotPath: "cypress/snapshots",
- snapshotName: "Strings",
+ it("works with strings", () => {
+ cy.wrap("foo-bar").snapshot({
+ snapshotPath: "cypress/fixtures/snapshots",
+ snapshotName: "Strings",
+ });
});
- });
- it(
- "works with arrays",
- {
- env: {
- SNAPSHOT_UPDATE: true,
+ it(
+ "works with arrays",
+ {
+ env: {
+ updateSnapshots: true,
+ },
},
- },
- () => {
- cy.wrap([1, 2, 3, 4]).snapshot({
- snapshotPath: "cypress/snapshots",
- snapshotName: "Arrays",
- });
- }
- );
- it('works with more "complicated" Objects', () => {
- cy.fixture("Complex").snapshot({
- snapshotPath: 'cypress/snapshots',
- snapshotName: "Complex"
+ () => {
+ cy.wrap([1, 2, 3, 4]).snapshot({
+ snapshotPath: "cypress/fixtures/snapshots",
+ snapshotName: "Arrays",
+ });
+ }
+ );
+
+ });
+ context("complex types"
+ // , { env: { SNAPSHOT_UPDATE: true } }
+ , () => {
+ it('works with more "complicated" Objects', () => {
+ cy.wrap({
+ "status": 200,
+ "response": {
+ "array": [0, 1, 2, "4"],
+ "object": {
+ "with": "more details"
+ }
+ },
+ "thisisnew": "wtf"
+ }).snapshot()
})
+ it("works based on fixtures", () => {
+ cy
+ .wrap({
+ "jsonapi": {
+ "version": "2.0"
+ },
+ "included": [
+ {
+ "type": "users",
+ "id": "2",
+ "attributes": {
+ "name": "Test"
+ }
+ }
+ ]
+ })
+ .snapshot();
+ });
})
- });
});
diff --git a/cypress/e2e/2.cy.js b/cypress/e2e/2.cy.js
index 9d4abde..ebd6fd7 100644
--- a/cypress/e2e/2.cy.js
+++ b/cypress/e2e/2.cy.js
@@ -3,25 +3,21 @@
describe("Random Describe", () => {
context("Random Context", () => {
it("Random It", () => {
- cy.fixture("File").snapshot("Fixture File", {
- snapshotName: "Random Fixture File"
- });
- // cy.fixture("File2").snapshot("Fixture File",
+ cy.wrap(42).snapshot("Numbers");
+ cy.wrap("foo-bar").snapshot("Strings");
+ cy.wrap([1, 2, 3]).snapshot("Arrays");
});
// it("works with numbers", () => {
// console.log(cy.wrap(42))
- // cy.wrap(42).snapshot();
// });
// it("works with strings", () => {
// 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();
// });
});
});
diff --git a/cypress/fixtures/File.json b/cypress/fixtures/File.json
deleted file mode 100644
index fe41954..0000000
--- a/cypress/fixtures/File.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": "bar",
- "Fizzy Drink": "Soda"
-}
diff --git a/cypress/fixtures/File2.json b/cypress/fixtures/File2.json
deleted file mode 100644
index effe26b..0000000
--- a/cypress/fixtures/File2.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": "bar",
- "Fizzy Drink": "Pop"
-}
diff --git a/cypress/fixtures/Random-Describe/Random-Context/Random-It/Arrays.json b/cypress/fixtures/Random-Describe/Random-Context/Random-It/Arrays.json
new file mode 100644
index 0000000..83589cc
--- /dev/null
+++ b/cypress/fixtures/Random-Describe/Random-Context/Random-It/Arrays.json
@@ -0,0 +1,7 @@
+{
+ "data": [
+ 1,
+ 2,
+ 3
+ ]
+}
\ No newline at end of file
diff --git a/cypress/snapshots/Numbers.json b/cypress/fixtures/Random-Describe/Random-Context/Random-It/Numbers.json
similarity index 100%
rename from cypress/snapshots/Numbers.json
rename to cypress/fixtures/Random-Describe/Random-Context/Random-It/Numbers.json
diff --git a/cypress/snapshots/Strings.json b/cypress/fixtures/Random-Describe/Random-Context/Random-It/Strings.json
similarity index 100%
rename from cypress/snapshots/Strings.json
rename to cypress/fixtures/Random-Describe/Random-Context/Random-It/Strings.json
diff --git a/cypress/fixtures/datashard-snapshot/complex-types/works-based-on-fixtures.json b/cypress/fixtures/datashard-snapshot/complex-types/works-based-on-fixtures.json
new file mode 100644
index 0000000..ac6239a
--- /dev/null
+++ b/cypress/fixtures/datashard-snapshot/complex-types/works-based-on-fixtures.json
@@ -0,0 +1,14 @@
+{
+ "jsonapi": {
+ "version": "2.0"
+ },
+ "included": [
+ {
+ "type": "users",
+ "id": "2",
+ "attributes": {
+ "name": "Test"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/cypress/fixtures/Complex.json b/cypress/fixtures/datashard-snapshot/complex-types/works-with-more-complicated-Objects.json
similarity index 79%
rename from cypress/fixtures/Complex.json
rename to cypress/fixtures/datashard-snapshot/complex-types/works-with-more-complicated-Objects.json
index 1de1100..0b48984 100644
--- a/cypress/fixtures/Complex.json
+++ b/cypress/fixtures/datashard-snapshot/complex-types/works-with-more-complicated-Objects.json
@@ -5,10 +5,11 @@
0,
1,
2,
- "Three"
+ "4"
],
"object": {
"with": "more details"
}
- }
+ },
+ "thisisnew": "wtf"
}
\ No newline at end of file
diff --git a/cypress/snapshots/Arrays.json b/cypress/fixtures/datashard-snapshot/simple-types/works-with-arrays.json
similarity index 100%
rename from cypress/snapshots/Arrays.json
rename to cypress/fixtures/datashard-snapshot/simple-types/works-with-arrays.json
diff --git a/cypress/fixtures/datashard-snapshot/simple-types/works-with-numbers.json b/cypress/fixtures/datashard-snapshot/simple-types/works-with-numbers.json
new file mode 100644
index 0000000..7941fc3
--- /dev/null
+++ b/cypress/fixtures/datashard-snapshot/simple-types/works-with-numbers.json
@@ -0,0 +1,3 @@
+{
+ "data": 42
+}
\ No newline at end of file
diff --git a/cypress/snapshots/Objects.json b/cypress/fixtures/datashard-snapshot/simple-types/works-with-objects.json
similarity index 100%
rename from cypress/snapshots/Objects.json
rename to cypress/fixtures/datashard-snapshot/simple-types/works-with-objects.json
diff --git a/cypress/fixtures/datashard-snapshot/simple-types/works-with-strings.json b/cypress/fixtures/datashard-snapshot/simple-types/works-with-strings.json
new file mode 100644
index 0000000..c36f355
--- /dev/null
+++ b/cypress/fixtures/datashard-snapshot/simple-types/works-with-strings.json
@@ -0,0 +1,3 @@
+{
+ "data": "foo-bar"
+}
\ No newline at end of file
diff --git a/cypress/snapshots/Complex.json b/cypress/snapshots/Complex.json
deleted file mode 100644
index 25a8f3b..0000000
--- a/cypress/snapshots/Complex.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "status": 200,
- "response": {
- "array": [0, 1, 2, "Three"],
- "object": {
- "with": "more details"
- }
- }
-}
diff --git a/cypress/snapshots/Fixture-File.json b/cypress/snapshots/Fixture-File.json
deleted file mode 100644
index 86ac8e3..0000000
--- a/cypress/snapshots/Fixture-File.json
+++ /dev/null
@@ -1 +0,0 @@
-{"foo":"bar","Fizzy Drink":"Soda"}
\ No newline at end of file
diff --git a/cypress/snapshots/Random-Fixture-File.json b/cypress/snapshots/Random-Fixture-File.json
deleted file mode 100644
index cf78053..0000000
--- a/cypress/snapshots/Random-Fixture-File.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "foo": "bar",
- "Fizzy Drink": "Soda"
-}
\ No newline at end of file
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 56daf1d..887788f 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -1,2 +1,4 @@
// register .snapshot() command
-require('../..').register()
+
+
+require('../../src/index').register()
diff --git a/package-lock.json b/package-lock.json
index b95ae2c..e41eb02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,25 +1,21 @@
{
"name": "@datashard/snapshot",
- "version": "2.2.2",
+ "version": "2.3.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@datashard/snapshot",
- "version": "2.2.2",
+ "version": "2.3.2",
"license": "MIT",
"dependencies": {
"@wildpeaks/snapshot-dom": "1.6.0",
- "chai": "4.3.10",
"check-more-types": "2.24.0",
"js-beautify": "1.13.13",
- "jsondiffpatch": "0.5.0",
- "lazy-ass": "1.6.0",
- "snap-shot-compare": "3.0.0",
- "snap-shot-store": "1.2.3"
+ "lazy-ass": "1.6.0"
},
"devDependencies": {
- "cypress": "10.6.0",
+ "cypress": "12.13.0",
"debug": "3.2.7",
"dependency-check": "2.10.1"
},
@@ -232,22 +228,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/arch": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
@@ -286,14 +266,6 @@
"node": ">=0.8"
}
},
- "node_modules/assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
@@ -469,68 +441,6 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true
},
- "node_modules/chai": {
- "version": "4.3.10",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz",
- "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==",
- "dependencies": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.3",
- "deep-eql": "^4.1.3",
- "get-func-name": "^2.0.2",
- "loupe": "^2.3.6",
- "pathval": "^1.1.1",
- "type-detect": "^4.0.8"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/chalk/node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/chalk/node_modules/strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/check-error": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
- "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
- "dependencies": {
- "get-func-name": "^2.0.2"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/check-more-types": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz",
@@ -701,6 +611,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
@@ -711,7 +622,8 @@
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
},
"node_modules/colorette": {
"version": "2.0.19",
@@ -766,9 +678,9 @@
"dev": true
},
"node_modules/cypress": {
- "version": "10.6.0",
- "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz",
- "integrity": "sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA==",
+ "version": "12.13.0",
+ "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.13.0.tgz",
+ "integrity": "sha512-QJlSmdPk+53Zhy69woJMySZQJoWfEWun3X5OOenGsXjRPVfByVTHorxNehbzhZrEzH9RDUDqVcck0ahtlS+N/Q==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -786,12 +698,12 @@
"check-more-types": "^2.24.0",
"cli-cursor": "^3.1.0",
"cli-table3": "~0.6.1",
- "commander": "^5.1.0",
+ "commander": "^6.2.1",
"common-tags": "^1.8.0",
"dayjs": "^1.10.4",
- "debug": "^4.3.2",
+ "debug": "^4.3.4",
"enquirer": "^2.3.6",
- "eventemitter2": "^6.4.3",
+ "eventemitter2": "6.4.7",
"execa": "4.1.0",
"executable": "^4.1.1",
"extract-zip": "2.0.1",
@@ -804,7 +716,7 @@
"listr2": "^3.8.3",
"lodash": "^4.17.21",
"log-symbols": "^4.0.0",
- "minimist": "^1.2.6",
+ "minimist": "^1.2.8",
"ospath": "^1.2.2",
"pretty-bytes": "^5.6.0",
"proxy-from-env": "1.0.0",
@@ -819,7 +731,7 @@
"cypress": "bin/cypress"
},
"engines": {
- "node": ">=12.0.0"
+ "node": "^14.0.0 || ^16.0.0 || >=18.0.0"
}
},
"node_modules/cypress/node_modules/ansi-styles": {
@@ -866,9 +778,9 @@
}
},
"node_modules/cypress/node_modules/commander": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
- "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
+ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
"dev": true,
"engines": {
"node": ">= 6"
@@ -919,12 +831,6 @@
"node": ">=10"
}
},
- "node_modules/cypress/node_modules/minimist": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
- "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
- "dev": true
- },
"node_modules/cypress/node_modules/semver": {
"version": "7.3.7",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
@@ -988,17 +894,6 @@
"ms": "^2.1.1"
}
},
- "node_modules/deep-eql": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
- "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
- "dependencies": {
- "type-detect": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
@@ -1042,12 +937,6 @@
"ms": "2.0.0"
}
},
- "node_modules/dependency-check/node_modules/minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- },
"node_modules/dependency-check/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -1064,48 +953,6 @@
"defined": "^1.0.0"
}
},
- "node_modules/diff-match-patch": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz",
- "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw=="
- },
- "node_modules/disparity": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/disparity/-/disparity-3.0.0.tgz",
- "integrity": "sha512-n94Rzbv2ambRaFzrnBf34IEiyOdIci7maRpMkoQWB6xFYGA7Nbs0Z5YQzMfTeyQeelv23nayqOcssBoc6rKrgw==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "diff": "^4.0.1"
- },
- "bin": {
- "disparity": "bin/disparity"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/disparity/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/disparity/node_modules/diff": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
- "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
- "engines": {
- "node": ">=0.3.1"
- }
- },
"node_modules/ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
@@ -1164,6 +1011,7 @@
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true,
"engines": {
"node": ">=0.8.0"
}
@@ -1353,11 +1201,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/folktale": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/folktale/-/folktale-2.3.2.tgz",
- "integrity": "sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ=="
- },
"node_modules/forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -1401,14 +1244,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
- "node_modules/get-func-name": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
- "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
@@ -1509,29 +1344,11 @@
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"dev": true
},
- "node_modules/has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/has-ansi/node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
"engines": {
"node": ">=8"
}
@@ -1739,58 +1556,6 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
},
- "node_modules/jsondiffpatch": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.5.0.tgz",
- "integrity": "sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==",
- "dependencies": {
- "chalk": "^3.0.0",
- "diff-match-patch": "^1.0.0"
- },
- "bin": {
- "jsondiffpatch": "bin/jsondiffpatch"
- },
- "engines": {
- "node": ">=8.17.0"
- }
- },
- "node_modules/jsondiffpatch/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jsondiffpatch/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jsondiffpatch/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
@@ -2046,14 +1811,6 @@
"node": ">=8"
}
},
- "node_modules/loupe": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
- "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
- "dependencies": {
- "get-func-name": "^2.0.1"
- }
- },
"node_modules/lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@@ -2101,10 +1858,20 @@
"node": "*"
}
},
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
},
"node_modules/natives": {
"version": "1.1.6",
@@ -2160,14 +1927,6 @@
"node": ">=8"
}
},
- "node_modules/object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -2244,14 +2003,6 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
- "node_modules/pathval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
- "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
- "engines": {
- "node": "*"
- }
- },
"node_modules/pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
@@ -2326,11 +2077,6 @@
"node": ">=0.6"
}
},
- "node_modules/ramda": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz",
- "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ=="
- },
"node_modules/read-package-json": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.3.3.tgz",
@@ -2507,65 +2253,6 @@
"node": ">=8"
}
},
- "node_modules/snap-shot-compare": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/snap-shot-compare/-/snap-shot-compare-3.0.0.tgz",
- "integrity": "sha512-bdwNOAGuKwPU+qsn0ASxTv+QfkXU+3VmkcDOkt965tes+JQQc8d6SfoLiEiRVhCey4v+ip2IjNUSbZm5nnkI9g==",
- "dependencies": {
- "check-more-types": "2.24.0",
- "debug": "4.1.1",
- "disparity": "3.0.0",
- "folktale": "2.3.2",
- "lazy-ass": "1.6.0",
- "strip-ansi": "5.2.0",
- "variable-diff": "1.1.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/snap-shot-compare/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/snap-shot-store": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/snap-shot-store/-/snap-shot-store-1.2.3.tgz",
- "integrity": "sha512-KLSUkdXvSfoPGPSo5Qk97jYEpME96WECOuIOpW91OGYt/fX2g2xOvXA35EJziI32PlDbRfi36JxzUcSsh59Ykw==",
- "dependencies": {
- "check-more-types": "2.24.0",
- "debug": "3.1.0",
- "folktale": "2.0.1",
- "lazy-ass": "1.6.0",
- "ramda": "0.25.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/snap-shot-store/node_modules/debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/snap-shot-store/node_modules/folktale": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/folktale/-/folktale-2.0.1.tgz",
- "integrity": "sha512-3kDSWVkSlErHIt/dC73vu+5zRqbW1mlnL46s2QfYN7Ps0JcS9MVtuLCrDQOBa7sanA+d9Fd8F+bn0VcyNe68Jw=="
- },
- "node_modules/snap-shot-store/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
"node_modules/sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
@@ -2591,17 +2278,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dependencies": {
- "ansi-regex": "^4.1.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
@@ -2611,14 +2287,6 @@
"node": ">=6"
}
},
- "node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "engines": {
- "node": ">=0.8.0"
- }
- },
"node_modules/throttleit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
@@ -2667,14 +2335,6 @@
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
},
- "node_modules/type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
@@ -2702,15 +2362,6 @@
"node": ">=8"
}
},
- "node_modules/variable-diff": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/variable-diff/-/variable-diff-1.1.0.tgz",
- "integrity": "sha1-0r1cZtt2wTh52W5qMG7cmJ35eNo=",
- "dependencies": {
- "chalk": "^1.1.1",
- "object-assign": "^4.0.1"
- }
- },
"node_modules/verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
@@ -2916,16 +2567,6 @@
}
}
},
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
- },
"arch": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
@@ -2947,11 +2588,6 @@
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
- "assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="
- },
"astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
@@ -3085,55 +2721,6 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true
},
- "chai": {
- "version": "4.3.10",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz",
- "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==",
- "requires": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.3",
- "deep-eql": "^4.1.3",
- "get-func-name": "^2.0.2",
- "loupe": "^2.3.6",
- "pathval": "^1.1.1",
- "type-detect": "^4.0.8"
- }
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- }
- }
- },
- "check-error": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
- "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
- "requires": {
- "get-func-name": "^2.0.2"
- }
- },
"check-more-types": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz",
@@ -3264,6 +2851,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
"requires": {
"color-name": "~1.1.4"
}
@@ -3271,7 +2859,8 @@
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
},
"colorette": {
"version": "2.0.19",
@@ -3320,9 +2909,9 @@
"dev": true
},
"cypress": {
- "version": "10.6.0",
- "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz",
- "integrity": "sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA==",
+ "version": "12.13.0",
+ "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.13.0.tgz",
+ "integrity": "sha512-QJlSmdPk+53Zhy69woJMySZQJoWfEWun3X5OOenGsXjRPVfByVTHorxNehbzhZrEzH9RDUDqVcck0ahtlS+N/Q==",
"dev": true,
"requires": {
"@cypress/request": "^2.88.10",
@@ -3339,12 +2928,12 @@
"check-more-types": "^2.24.0",
"cli-cursor": "^3.1.0",
"cli-table3": "~0.6.1",
- "commander": "^5.1.0",
+ "commander": "^6.2.1",
"common-tags": "^1.8.0",
"dayjs": "^1.10.4",
- "debug": "^4.3.2",
+ "debug": "^4.3.4",
"enquirer": "^2.3.6",
- "eventemitter2": "^6.4.3",
+ "eventemitter2": "6.4.7",
"execa": "4.1.0",
"executable": "^4.1.1",
"extract-zip": "2.0.1",
@@ -3357,7 +2946,7 @@
"listr2": "^3.8.3",
"lodash": "^4.17.21",
"log-symbols": "^4.0.0",
- "minimist": "^1.2.6",
+ "minimist": "^1.2.8",
"ospath": "^1.2.2",
"pretty-bytes": "^5.6.0",
"proxy-from-env": "1.0.0",
@@ -3400,9 +2989,9 @@
}
},
"commander": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
- "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
+ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
"dev": true
},
"debug": {
@@ -3433,12 +3022,6 @@
"yallist": "^4.0.0"
}
},
- "minimist": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
- "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
- "dev": true
- },
"semver": {
"version": "7.3.7",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
@@ -3489,14 +3072,6 @@
"ms": "^2.1.1"
}
},
- "deep-eql": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
- "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
- "requires": {
- "type-detect": "^4.0.0"
- }
- },
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
@@ -3534,12 +3109,6 @@
"ms": "2.0.0"
}
},
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -3558,35 +3127,6 @@
"defined": "^1.0.0"
}
},
- "diff-match-patch": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz",
- "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw=="
- },
- "disparity": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/disparity/-/disparity-3.0.0.tgz",
- "integrity": "sha512-n94Rzbv2ambRaFzrnBf34IEiyOdIci7maRpMkoQWB6xFYGA7Nbs0Z5YQzMfTeyQeelv23nayqOcssBoc6rKrgw==",
- "requires": {
- "ansi-styles": "^4.1.0",
- "diff": "^4.0.1"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "diff": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
- "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
- }
- }
- },
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
@@ -3637,7 +3177,8 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
},
"eventemitter2": {
"version": "6.4.7",
@@ -3775,11 +3316,6 @@
"escape-string-regexp": "^1.0.5"
}
},
- "folktale": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/folktale/-/folktale-2.3.2.tgz",
- "integrity": "sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ=="
- },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -3814,11 +3350,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
- "get-func-name": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
- "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ=="
- },
"get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
@@ -3902,25 +3433,11 @@
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"dev": true
},
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "requires": {
- "ansi-regex": "^2.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- }
- }
- },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
},
"ieee754": {
"version": "1.2.1",
@@ -4066,42 +3583,6 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
},
- "jsondiffpatch": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.5.0.tgz",
- "integrity": "sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==",
- "requires": {
- "chalk": "^3.0.0",
- "diff-match-patch": "^1.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
@@ -4288,14 +3769,6 @@
}
}
},
- "loupe": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
- "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
- "requires": {
- "get-func-name": "^2.0.1"
- }
- },
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@@ -4334,10 +3807,17 @@
"brace-expansion": "^1.1.7"
}
},
+ "minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
},
"natives": {
"version": "1.1.6",
@@ -4382,11 +3862,6 @@
"path-key": "^3.0.0"
}
},
- "object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
- },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -4444,11 +3919,6 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
- "pathval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
- "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ=="
- },
"pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
@@ -4511,11 +3981,6 @@
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true
},
- "ramda": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz",
- "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ=="
- },
"read-package-json": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.3.3.tgz",
@@ -4661,62 +4126,6 @@
}
}
},
- "snap-shot-compare": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/snap-shot-compare/-/snap-shot-compare-3.0.0.tgz",
- "integrity": "sha512-bdwNOAGuKwPU+qsn0ASxTv+QfkXU+3VmkcDOkt965tes+JQQc8d6SfoLiEiRVhCey4v+ip2IjNUSbZm5nnkI9g==",
- "requires": {
- "check-more-types": "2.24.0",
- "debug": "4.1.1",
- "disparity": "3.0.0",
- "folktale": "2.3.2",
- "lazy-ass": "1.6.0",
- "strip-ansi": "5.2.0",
- "variable-diff": "1.1.0"
- },
- "dependencies": {
- "debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "requires": {
- "ms": "^2.1.1"
- }
- }
- }
- },
- "snap-shot-store": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/snap-shot-store/-/snap-shot-store-1.2.3.tgz",
- "integrity": "sha512-KLSUkdXvSfoPGPSo5Qk97jYEpME96WECOuIOpW91OGYt/fX2g2xOvXA35EJziI32PlDbRfi36JxzUcSsh59Ykw==",
- "requires": {
- "check-more-types": "2.24.0",
- "debug": "3.1.0",
- "folktale": "2.0.1",
- "lazy-ass": "1.6.0",
- "ramda": "0.25.0"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "folktale": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/folktale/-/folktale-2.0.1.tgz",
- "integrity": "sha512-3kDSWVkSlErHIt/dC73vu+5zRqbW1mlnL46s2QfYN7Ps0JcS9MVtuLCrDQOBa7sanA+d9Fd8F+bn0VcyNe68Jw=="
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
@@ -4734,25 +4143,12 @@
"tweetnacl": "~0.14.0"
}
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- },
"strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true
},
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
- },
"throttleit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
@@ -4795,11 +4191,6 @@
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
},
- "type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
- },
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
@@ -4818,15 +4209,6 @@
"integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
"dev": true
},
- "variable-diff": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/variable-diff/-/variable-diff-1.1.0.tgz",
- "integrity": "sha1-0r1cZtt2wTh52W5qMG7cmJ35eNo=",
- "requires": {
- "chalk": "^1.1.1",
- "object-assign": "^4.0.1"
- }
- },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
diff --git a/package.json b/package.json
index 0be2c4e..d94f1ce 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,8 @@
{
"name": "@datashard/snapshot",
- "description": "Adds value / object / DOM element snapshot testing support to Cypress test runner",
- "version": "2.3.2",
- "author": "Joshua , Gleb Bahmutov ",
+ "description": "Adds JSON Snapshot testing support to Cypress",
+ "version": "3.0.0-beta",
+ "author": "Joshua ",
"bugs": "https://github.com/datashard/snapshot/issues",
"engines": {
"node": ">=6"
@@ -13,13 +13,13 @@
"src/*/**",
"!src/*-spec.js"
],
- "homepage": "https://github.com/datashard/snapshot#readme",
+ "homepage": "https://shard.wtf/snapshot",
"keywords": [
"cypress",
"cypress-io",
"plugin",
"snapshot",
- "testing"
+ "testing", "json"
],
"license": "MIT",
"main": "src/index.js",
@@ -33,11 +33,11 @@
"unused-deps": "dependency-check --unused --no-dev . --entry src/index.js",
"semantic-release": "semantic-release",
"cypress:open": "cypress open",
- "cypress:update": "cypress run --env SNAPSHOT_UPDATE=true",
+ "cypress:update": "cypress run --env updateSnapshots=true",
"cypress:run": "cypress run"
},
"devDependencies": {
- "cypress": "10.6.0",
+ "cypress": "12.13.0",
"debug": "3.2.7",
"dependency-check": "2.10.1"
},
diff --git a/src/index.js b/src/index.js
index c1cc876..763a201 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,7 +1,6 @@
// global cy, Cypress
-const { functions } = require("./utils/index");
+const register = require("./register");
module.exports = {
- register: functions.register,
- tasks: functions.tasks,
+ register
};
diff --git a/src/register.js b/src/register.js
new file mode 100644
index 0000000..3e34641
--- /dev/null
+++ b/src/register.js
@@ -0,0 +1,119 @@
+const lazy = require("lazy-ass");
+const is = require("check-more-types");
+const snapshot = require("./snapshot");
+
+const baseStyles = [
+ {
+ name: 'info',
+ color: '#cbd5e1',
+ },
+ {
+ name: 'success',
+ color: '#10b981',
+ },
+ {
+ name: 'warning',
+ color: '#fbbf24',
+ },
+ {
+ name: 'error',
+ color: '#dc2626',
+ },
+]
+
+/**
+* Helper function to convert hex colors to rgb
+* @param {string} hex - hex color
+* @returns {string}
+*
+* @example
+* // returns "255 255 255"
+* hex2rgb("#ffffff")
+*/
+function hex2rgb(hex) {
+ const r = parseInt(hex.slice(1, 3), 16)
+ const g = parseInt(hex.slice(3, 5), 16)
+ const b = parseInt(hex.slice(5, 7), 16)
+
+ return `${r} ${g} ${b}`
+}
+
+baseStyles.forEach((style) => {
+ createCustomLog(style.name, style.color)
+})
+
+/**
+* Create a custom log
+* @param {string} name - Name of the custom log
+* @param {string} baseColor - Base color of the custom log in hex format
+*
+* @example
+* // Create a custom log with name "misc" and base color "#9333ea"
+* createCustomLog("misc", "#9333ea")
+*/
+function createCustomLog(name, baseColor) {
+ if (!name || !baseColor) {
+ throw new Error('Missing parameters')
+ }
+
+ const logStyle = document.createElement('style')
+
+ logStyle.textContent = `
+ .command.command-name-log-${name} span.command-method {
+ margin-right: 0.5rem;
+ min-width: 10px;
+ border-radius: 0.125rem;
+ border-width: 1px;
+ padding-left: 0.375rem;
+ padding-right: 0.375rem;
+ padding-top: 0.125rem;
+ padding-bottom: 0.125rem;
+ text-transform: uppercase;
+
+ border-color: rgb(${hex2rgb(baseColor)} / 1);
+ background-color: rgb(${hex2rgb(baseColor)} / 0.2);
+ color: rgb(${hex2rgb(baseColor)} / 1) !important;
+ }
+
+ .command.command-name-log-${name} span.command-message{
+ color: rgb(${hex2rgb(baseColor)} / 1);
+ font-weight: normal;
+ }
+
+ .command.command-name-log-${name} span.command-message strong,
+ .command.command-name-log-${name} span.command-message em {
+ color: rgb(${hex2rgb(baseColor)} / 1);
+ }
+ `
+
+ Cypress.$(window.top.document.head).append(logStyle)
+}
+
+/**
+* Print a message with a formatted style
+* @param {Object} log - The message to be printed.
+* @param {string} log.title - The title of the message.
+* @param {string} log.message - The content of the message.
+* @param {('info' | 'warning' | 'error' | 'success')} log.type - The type of the message.
+*
+* @example
+* // Print a message with a formatted style e.g. success
+* cy.print({ title: 'foo', message: 'bar', type: 'success' })
+*/
+function cyPrint({ title, message, type }) {
+ Cypress.log({
+ name: `log-${type}`,
+ displayName: `${title}`,
+ message,
+ })
+}
+
+module.exports = () => {
+ lazy(is.fn(global.before), "Missing global before function");
+ lazy(is.fn(global.after), "Missing global after function");
+ lazy(is.object(global.Cypress), "Missing Cypress object");
+
+ Cypress.Commands.add("snapshot", { prevSubject: "optional" }, snapshot);
+ Cypress.Commands.add('SNAPSHOT_prettyprint', cyPrint)
+
+};
diff --git a/src/snapshot.js b/src/snapshot.js
new file mode 100644
index 0000000..99bc50c
--- /dev/null
+++ b/src/snapshot.js
@@ -0,0 +1,118 @@
+const serializeDomElement = require("./utils/serializers/serializeDomElement");
+const serializeToHTML = require("./utils/serializers/serializeToHTML");
+const compareValues = require("./utils/compareValues");
+const path = require("path");
+const identity = (x) => x;
+
+const pickSerializer = (asJson, value) => {
+ if (Cypress.dom.isJquery(value)) {
+ return asJson ? serializeDomElement : serializeToHTML;
+ }
+ return identity;
+};
+
+/**
+ *
+ * @param {string} text
+ * @returns {string}
+ */
+
+const parseTextToJSON = (text) => text.replace(/\| [✅➖➕⭕]/g, "").trim().replace(/(.*?),\s*(\}|])/g, "$1$2").replace(/},(?!")$/g, "}").replaceAll(/[╺┿╳]/g, "")
+
+const store_snapshot = ({ value, name, raiser } = { value, name, raiser }) => {
+ if (Cypress.env().updateSnapshots || Cypress.config('snapshot').updateSnapshots) {
+ cy.SNAPSHOT_prettyprint({ title: "INFO", type: "info", message: "Saving Snapshot" })
+ cy.writeFile(path.join(Cypress.config().fixturesFolder, `${name}.json`), JSON.stringify(value, null, 2))
+ } else {
+ cy.fixture(name).then(expected => raiser({ value, expected }))
+ }
+};
+
+const set_snapshot = ({ snapshotName, serialized, value }) => {
+ let devToolsLog = { $el: serialized };
+ if (Cypress.dom.isJquery(value)) {
+ devToolsLog.$el = value;
+ }
+
+ let options = {
+ name: "snapshot",
+ message: snapshotName,
+ consoleProps: () => { return devToolsLog },
+ ...(value && { $el: value })
+ };
+
+ const raiser = ({ value, expected }) => {
+ const result = compareValues({ expected, value });
+ if ((!Cypress.env().updateSnapshots || !Cypress.config('snapshot').updateSnapshots) && !result.success) {
+ devToolsLog = () => {
+ return { expected, value }
+ };
+
+ const error = (inError) => `
+ Snapshot Difference found.\nPlease Update the Snapshot ${inError ? `\n${JSON.stringify(JSON.parse(parseTextToJSON(result.result)), null, 3).replaceAll(' ', " ")}` : ""}`
+
+ Cypress.log({ message: error(true) })
+
+ throw new Error(error());
+ } else {
+ cy.SNAPSHOT_prettyprint({
+ title: "SUCCESS",
+ message: snapshotName,
+ type: "success"
+ })
+ }
+ };
+
+
+
+ store_snapshot({
+ value,
+ name: snapshotName,
+ raiser,
+ });
+};
+
+function replaceCharacters(str, asFolder, sep) {
+ if (asFolder) {
+ if (!sep) throw new Error("Separator not Passed.")
+ return str
+ .replace(/ /gi, '-')
+ .replace(/\//gi, "-")
+ .replaceAll('"', '')
+ .replaceAll(sep, '/')
+ } else {
+ return str
+ .replaceAll(' ', '-')
+ .replaceAll('/', '-')
+ .replaceAll('"', '')
+ }
+}
+
+const get_snapshot_name = (asFolder, stepName) => {
+ const names = Cypress.currentTest.titlePath;
+ const sep = ">>datashard.work<<"
+
+
+ if (stepName && typeof stepName !== 'object') {
+ names.push(stepName)
+ }
+
+
+ if (asFolder) return replaceCharacters(names.join(sep), true, sep)
+ else return replaceCharacters(names.join('__'), false)
+};
+
+module.exports = (value, stepName, options = { json: true }) => {
+ if (typeof stepName === 'object') options = { ...options, ...stepName }
+ if (typeof value !== "object" || Array.isArray(value))
+ value = { data: value };
+ const serializer = pickSerializer(options.json, value);
+ const serialized = serializer(value);
+ options.asFolder = Cypress.config('snapshot').useFolders || false
+
+ set_snapshot({
+ snapshotName: `/${get_snapshot_name(options.asFolder, stepName)}`,
+ serialized,
+ value,
+ });
+};
diff --git a/src/utils/snapshots/compareValues.js b/src/utils/compareValues.js
similarity index 53%
rename from src/utils/snapshots/compareValues.js
rename to src/utils/compareValues.js
index bd05fef..1c7c885 100644
--- a/src/utils/snapshots/compareValues.js
+++ b/src/utils/compareValues.js
@@ -1,115 +1,79 @@
-// const { expect: chaiExpect } = require("chai");
-
-const isNestedData = (expected, value) => {
- return (
- expected && value && typeof expected == `object` && typeof value == `object`
- );
-};
-
-const checkDataState = (expected, value) => {
- let result;
-
- if (expected === value) {
- result = `| ✅ "${value}",`;
- } else if (expected == undefined) {
- result = `| ➖ "➖╺ ${expected}|${value}",`;
- } else if (value == undefined) {
- result = `| ➕ "➕┿ ${expected}|${value}",`;
- } else {
- result = `| ⭕ "⭕╳ ${expected}|${value}",`;
- }
-
- return result;
-};
-
-
-/**
- *
- * @param {string} text
- * @returns {string}
- */
-
-function parseTextToJSON(text) {
- const lines =
- text
- .replace(/\| [✅➖➕⭕]/g, "").trim()
- .replace(/(.*?),\s*(\}|])/g, "$1$2");
- return lines;
- // return JSON.stringify(lines, null, 2);
-}
-
-function containsDiffChars(str) {
- const emojis = ["╺", "┿", "╳"];
- return emojis.some(emoji => str.includes(emoji));
-}
-
-const compare = (expected, value) => {
- let compareResult = "";
- let compareSuccess = true;
-
- if (isNestedData(expected, value)) {
- if (Array.isArray(expected)) {
- compareResult += `[`;
- let dataX, dataY;
-
- if (expected.length >= value.length) {
- dataX = expected;
- dataY = value;
- } else {
- dataX = value;
- dataY = expected;
- }
-
- dataX.forEach(function (item, index) {
- const resultset = compare(item, dataY[index]);
- compareSuccess = resultset.success;
- compareResult += resultset.result;
- });
- compareResult += `],`;
- } else {
- let dataX, dataY;
- compareResult += `{`;
- if (Object.keys(expected).length >= Object.keys(value).length) {
- dataX = expected;
- dataY = value;
- } else {
- dataX = value;
- dataY = expected;
- }
-
- Object.keys(dataX).forEach((key) => {
- const resultset = compare(dataX[key], dataY[key]);
-
- compareSuccess = resultset.success;
- compareResult += `"${key}": ${resultset.result}`;
- });
- compareResult += `}`;
- }
- } else {
- compareSuccess = false;
- compareResult = checkDataState(expected, value);
- }
- let result = parseTextToJSON(compareResult);
- // let result = compareResult;
-
- try {
- return {
- success: !containsDiffChars(result),
- result,
- };
- } catch (error) {
- return { success: false, result };
- }
-};
-
-/**
- *
- * @param {{
- * expected: { [k:string]: any},
- * value: {[k:string]:any}
- * }} values
- */
-
-module.exports = function compareValues(values) {
- return compare(values.expected, values.value);
-};
+
+const containsDiffChars = str => ["╺", "┿", "╳"].some(emoji => str.includes(emoji));
+const isNestedData = (expected, value) => expected && value && typeof expected == 'object' && typeof value == 'object';
+
+
+const checkDataState = (expected, value) => {
+ let result;
+ if (expected === value) {
+ result = `| ✅ "${value}",`;
+ } else {
+ result = `| ⭕ "⭕╳ ${JSON.stringify(expected)?.replaceAll('"', "'")} | ${value?.replaceAll('"', "'")}",`;
+ }
+
+ return result;
+};
+
+const compare = (expected, value) => {
+ let compareResult = "";
+
+ if (isNestedData(expected, value)) {
+ if (Array.isArray(expected)) {
+ compareResult += `[`;
+ let dataX, dataY;
+
+ if (expected.length >= value.length) {
+ dataX = expected;
+ dataY = value;
+ } else {
+ dataX = value;
+ dataY = expected;
+ }
+
+ dataX.forEach(function (item, index) {
+ const resultset = compare(item, dataY[index]);
+ compareResult += resultset.result;
+ });
+ compareResult += `],`;
+ } else {
+ let dataX, dataY;
+ compareResult += `{`;
+ if (Object.keys(expected).length >= Object.keys(value).length) {
+ dataX = expected;
+ dataY = value;
+ } else {
+ dataX = value;
+ dataY = expected;
+ }
+
+ Object.keys(dataX).forEach((key) => {
+ const resultset = compare(dataX[key], dataY[key]);
+ compareResult += `"${key}": ${resultset.result}`;
+ });
+ compareResult += `},`;
+ }
+ } else {
+ compareResult = checkDataState(expected, value);
+ }
+
+ try {
+ return {
+ success: !containsDiffChars(compareResult),
+ result: compareResult,
+ };
+ } catch (error) {
+ return { success: false, result: compareResult };
+ }
+};
+
+/**
+ *
+ * @param {{
+ * expected: { [k:string]: any},
+ * value: {[k:string]:any}
+ * }} values
+ */
+
+module.exports = function compareValues(values) {
+ return compare(values.expected, values.value);
+};
diff --git a/src/utils/functions/addTasks.js b/src/utils/functions/addTasks.js
deleted file mode 100644
index 4d01f92..0000000
--- a/src/utils/functions/addTasks.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const readFileMaybe = require("../tasks/readFileMaybe");
-
-module.exports = (on, config) => {
- on("task", { readFileMaybe });
-};
diff --git a/src/utils/functions/register.js b/src/utils/functions/register.js
deleted file mode 100644
index 8ad3504..0000000
--- a/src/utils/functions/register.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const lazy = require("lazy-ass");
-const is = require("check-more-types");
-const snapshot = require("../snapshots/snapshot");
-
-module.exports = () => {
- lazy(is.fn(global.before), "Missing global before function");
- lazy(is.fn(global.after), "Missing global after function");
- lazy(is.object(global.Cypress), "Missing Cypress object");
-
- Cypress.Commands.add("snapshot", { prevSubject: true }, snapshot);
-
- return snapshot;
-};
diff --git a/src/utils/index.js b/src/utils/index.js
deleted file mode 100644
index ae0b254..0000000
--- a/src/utils/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const serializeToHTML = require("./serializers/serializeToHTML");
-const serializeDomElement = require("./serializers/serializeDomElement");
-const compareValues = require("./snapshots/compareValues");
-const readFileMaybe = require("./tasks/readFileMaybe");
-const identity = (x) => x;
-const publicProps = (name) => !name.startsWith("__");
-const countSnapshots = (snapshots) =>
- Object.keys(snapshots).filter(publicProps).length;
-
-module.exports = {
- serializers: {
- serializeDomElement,
- serializeToHTML,
- identity,
- countSnapshots,
- },
- snapshots: {
- compareValues,
- },
-
- functions: {
- register: require("./functions/register"),
- tasks: require("./functions/addTasks"),
- },
- tasks: {
- readFileMaybe,
- },
-};
diff --git a/src/utils/snapshots/snapshot.js b/src/utils/snapshots/snapshot.js
deleted file mode 100644
index 8f9f3b6..0000000
--- a/src/utils/snapshots/snapshot.js
+++ /dev/null
@@ -1,111 +0,0 @@
-const serializeDomElement = require("../serializers/serializeDomElement");
-const serializeToHTML = require("../serializers/serializeToHTML");
-const compareValues = require("./compareValues");
-const path = require("path");
-const identity = (x) => x;
-
-const pickSerializer = (asJson, value) => {
- if (Cypress.dom.isJquery(value)) {
- return asJson ? serializeDomElement : serializeToHTML;
- }
- return identity;
-};
-
-const store_snapshot = (props = { value, name, path, raiser }) => {
- const expectedPath = path.join(
- props.path ||
- Cypress.config("snapshot").snapshotPath ||
- "cypress/snapshots",
- `${props.name.join("_").replace(/ /gi, "-").replace(/\//gi, "-")}.json`
- );
- cy.task("readFileMaybe", expectedPath).then((exist) => {
- if (exist && !Cypress.env().SNAPSHOT_UPDATE) {
- props.raiser({ value: props.value, expected: JSON.parse(exist) });
- } else {
- cy.writeFile(expectedPath, JSON.stringify(props.value, null, 2));
- }
- });
-};
-
-const set_snapshot = (
- { snapshotName, snapshotPath, serialized, value }
-) => {
- let devToolsLog = { $el: serialized };
-
- if (Cypress.dom.isJquery(value)) {
- devToolsLog.$el = value;
- }
-
- const options = {
- name: "snapshot",
- message: Cypress._.last(snapshotName),
- consoleProps: () => devToolsLog,
- };
-
- if (value) options.$el = value;
-
- const raiser = ({ value, expected }) => {
- const result = compareValues({ expected, value });
-
- if (!Cypress.env().SNAPSHOT_UPDATE && !result.success) {
- devToolsLog = {
- ...devToolsLog,
- message: result,
- expected,
- value,
- };
-
- // ╺
- // ┿
- // ╳
-
- throw new Error(
- `Snapshot Difference found.\nPlease Update the Snapshot\n\n${JSON.stringify(
- JSON.parse(result.result),
- null,
- 2
- )
- .replaceAll(" ", " ")
- .replaceAll(/[╺┿╳]/g, "")}`
- // `Snapshot Difference found.\nPlease Update the Snapshot\n\n${result.result}`
- );
- }
- };
- Cypress.log(options);
-
- store_snapshot({
- value,
- name: snapshotName,
- path: snapshotPath,
- raiser,
- });
-};
-
-const get_snapshot_name = (test, custom_name) => {
- const names = test.titlePath;
-
- const index = custom_name;
- names.push(String(index));
-
- if (custom_name) return [custom_name];
- return names;
-};
-
-module.exports = (value, step, options) => {
- if (typeof step === "object") options = step;
- if (typeof value !== "object" || Array.isArray(value))
- value = { data: value };
-
- const serializer = pickSerializer(options.json, value);
- const serialized = serializer(value);
-
- set_snapshot({
- snapshotName: get_snapshot_name(
- Cypress.currentTest,
- options.snapshotName || step
- ),
- snapshotPath: options.snapshotPath,
- serialized,
- value,
- });
-};
diff --git a/src/utils/tasks/readFileMaybe.js b/src/utils/tasks/readFileMaybe.js
deleted file mode 100644
index 192c432..0000000
--- a/src/utils/tasks/readFileMaybe.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const fs = require("fs");
-
-module.exports = (filename) => {
- if (fs.existsSync(filename)) {
- return fs.readFileSync(filename, "utf8");
- }
-
- return false;
-};