cypress-diff
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "cypress-diff", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "The library highlights the difference between the expected and actual values in the Cypress Test Runner UI.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -13,2 +13,4 @@ # cypress-diff | ||
Add the following line to your `cypress/support/index.js` file: | ||
### JavaScript | ||
@@ -21,15 +23,2 @@ | ||
or you can add it to your `Cypress.on('fail')` handler: | ||
```js | ||
// cypress/support/e2e.js | ||
const { onFailHandler } = require('cypress-diff'); | ||
Cypress.on('fail', (error, runnable) => { | ||
// ... | ||
onFailHandler(error, runnable); | ||
// ... | ||
}); | ||
``` | ||
### TypeScript | ||
@@ -42,7 +31,11 @@ | ||
```ts | ||
// cypress/support/e2e.ts | ||
import { onFailHandler } from 'cypress-diff'; | ||
## Configuration (optional) | ||
Cypress.on('fail', (error: CypressError, runnable: Runner) => { | ||
In case you are using a `Cypress.on('fail')` handler in your tests already then you can configure the plugin like this: | ||
```js | ||
// cypress/support/e2e.js | ||
const { onFailHandler } = require('cypress-diff'); | ||
Cypress.on('fail', (error, runnable) => { | ||
// ... | ||
@@ -49,0 +42,0 @@ onFailHandler(error, runnable); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
516366
51