Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 13 days 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 (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-29T01:36:29.000Z (5 months ago)
- Last Synced: 2024-05-29T15:30:41.979Z (5 months ago)
- Topics: cypress, cypress-io, e2e, reporter, testing, tools
- Language: JavaScript
- Homepage:
- Size: 680 KB
- Stars: 23
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cypress-diff
[![npm](https://img.shields.io/npm/dt/cypress-diff)](https://www.npmjs.com/package/cypress-diff)
![cypress-diff](assets/cypress-diff.png)
> 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