https://github.com/elaichenkov/cypress-diff
cypress-diff makes your life easier to find out why your tests are failing
https://github.com/elaichenkov/cypress-diff
cypress cypress-io e2e reporter testing tools
Last synced: 6 months ago
JSON representation
cypress-diff makes your life easier to find out why your tests are failing
- Host: GitHub
- URL: https://github.com/elaichenkov/cypress-diff
- Owner: elaichenkov
- License: mit
- Created: 2023-12-02T10:09:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T15:07:12.000Z (6 months ago)
- Last Synced: 2025-04-21T17:05:13.853Z (6 months ago)
- Topics: cypress, cypress-io, e2e, reporter, testing, tools
- Language: JavaScript
- Homepage:
- Size: 915 KB
- Stars: 26
- Watchers: 2
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cypress-diff
[](https://www.npmjs.com/package/cypress-diff)

> Keep in mind that it's still in beta. Please, report any issues you find. Moreover, this library is designed to work with texts and objects.
## Installation
```bash
npm i -D cypress-diff
```## Usage
Add the following line to your `cypress/support/e2e.js` file:
### JavaScript
```js
// cypress/support/e2e.js
require('cypress-diff');
```### TypeScript
```ts
// cypress/support/e2e.ts
import 'cypress-diff';
```## Configuration (optional)
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) => {
// ...
onFailHandler(error, runnable);
// ...
});
```## License
[MIT](LICENSE)
### Author
Yevhen Laichenkov