@bouzuya/screenshot-testing
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

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);

License

MIT

Author

bouzuya <m@bouzuya.net> (http://bouzuya.net)

Readme

Keywords

none

Package Sidebar

Install

npm i @bouzuya/screenshot-testing

Weekly Downloads

2

Version

0.3.0

License

MIT

Last publish

Collaborators

  • bouzuya