jest-snapshot-nightwatch
v1.0.4
Published
Integration of jest-snapshot into the nightwatch test runner.
Downloads
8
Readme
jest-snapshot-nightwatch
Use the package to integrate the jest-snapshot package into your Nightwatch.js tests:
const expect = require('expect');
const toMatchSnapshot = require('jest-snapshot-nightwatch');
expect.extend({toMatchSnapshot});
module.exports = {
'@unitTest': true,
'Sample snapshot test': function () {
expect('foo').toMatchSnapshot();
},
};
Run your tests like normal to create new snapshots or assert existing ones:
npm run testRun with the SNAPSHOT_UPDATE environment variable set to update snapshots to the latest version:
SNAPSHOT_UPDATE=1 npm run testMore information on snapshot testing from the jest documentation.
