1.0.4 • Published 5 years ago

jest-snapshot-nightwatch v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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 test

Run with the SNAPSHOT_UPDATE environment variable set to update snapshots to the latest version:

SNAPSHOT_UPDATE=1 npm run test

More information on snapshot testing from the jest documentation.