@bouzuya/screenshot-testing
v0.3.0
Published
A screenshot testing tool for JavaScript (Node.js)
Downloads
3
Readme
screenshot-testing-js
A screenshot testing tool for JavaScript (Node.js).
Installation
npm install @bouzuya/screenshot-testing
Usage
import { execute } from '@bouzuya/screenshot-testing';
const command = process.argv[2]; // 'approve' or 'capture' or 'compare' or 'test'
const options = {
path: {
approved: 'approved/',
captured: 'captured/',
compared: 'compared/'
},
scenarios: [
{
action: async (page) => {
await page.goto('http://example.com');
return {};
},
name: 'scenario1'
}
]
};
execute(command, options);