chai-resemble
Version:
Chai helper for visually comparing HTML pages
40 lines (28 loc) • 1.43 kB
Markdown
# chai-resemble
[](https://www.npmjs.com/package/chai-resemble)
[](https://travis-ci.org/giakki/chai-resemble)
[](https://coveralls.io/github/giakki/chai-resemble)
[](https://david-dm.org/giakki/chai-resemble)
[](https://david-dm.org/giakki/chai-resemble#info=devDependencies)
Chai helper for visually comparing HTML pages.
## Installation
```shell
npm install chai-resemble
```
## Usage
```js
var chai = require('chai'),
resemble = require('chai-resemble.js');
chai.use(resemble);
describe('chai-resemble', function() {
it('Should resemble the original', function(done) {
expect('https://www.google.com').to.resemble('https://www.google.com', done);
});
// Specify where to store files.
it('Should resemble the original', function(done) {
expect('https://www.google.com').to.resemble('https://www.google.com' { name: 'filename', outDir: 'directory' }, done);
});
});
```
## License
Copyright (c) 2019 Giacomo Martino. See the [LICENSE](/LICENSE.md) file for license rights and limitations (MIT).