@tdd-buffet/visual
TypeScript icon, indicating that this package has built-in type declarations

0.3.11 • Public • Published

Visual testing for tdd-buffet using Mugshot

Build Status codecov npm type definitions


Install

npm install tdd-buffet @tdd-buffet/visual

Create a visual test

import { describe } from 'tdd-buffet/suite/gui';
import { vit } from '@tdd-buffet/visual';

describe('Visual suite', () => {
  vit('screenshot name', async (page) => {
    await page.goto('http://www.github.com');
  });
});

The above will take a screenshot of the first child in body and save it at tests/gui/screenshots/${fullTestName}.png (relative to cwd) where

  • fullTestName is the full name of the vit test including all parent describe block names (in this case visual_suite_screenshot_name).

You can mix and match "normal" tests (it) and visual tests (vit) and only the visual ones will result in screenshots being taken.

Dependencies (4)

Dev Dependencies (2)

Package Sidebar

Install

npm i @tdd-buffet/visual

Weekly Downloads

0

Version

0.3.11

License

MIT

Unpacked Size

10.4 kB

Total Files

6

Last publish

Collaborators

  • nighttrax