start rewriting readme

This commit is contained in:
Joshua 2023-02-20 19:21:40 +01:00
parent af82f108ad
commit 7f629969d5

View file

@ -1,4 +1,4 @@
# @cypress/snapshot
# @datashard/snapshot
> Adds value / object / DOM element snapshot testing support to Cypress test runner
@ -30,6 +30,7 @@ After installing, add the following to your `cypress/support/commands.js` file
```js
require("@cypress/snapshot").register();
```
This registers a new command to create new snapshot or compare value to old snapshot
and add the following to your `cypress.config.js`
@ -43,7 +44,6 @@ and add the following to your `cypress.config.js`
**Note:** `@cypress/snapshot` **requires** the `readFileMaybe` plugin to be included, which can be easily done using the code above
# Usage
Currently, if you want to take more than one snapshot, you need to pass a Step Name to prevent overwrites / test failures
@ -116,6 +116,7 @@ cy.get(...).snapshot("Intercepted API Request", {
This module provides some configuration options:
#### snapshotPath
Sets the default Path for saving Snapshots (default: `cypress/snapshots`)
## Debugging
@ -126,7 +127,7 @@ To debug this module run with environment variable `DEBUG=@cypress/snapshot`
### Small print
Author: Gleb Bahmutov <gleb@cypress.io> & Joshua D. <[data@shard.wtf](mailto:data@shard.wtf)> © Cypress.io 2017-2022
Author: Gleb Bahmutov <gleb@cypress.io> & Joshua D. <[data@shard.wtf](mailto:data@shard.wtf)> © Cypress.io 2017-2022
<br>
License: MIT - do anything with the code, but don't blame us if it does not work.