Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Latest commit

 

History

History
42 lines (25 loc) · 1.26 KB

TESTING.md

File metadata and controls

42 lines (25 loc) · 1.26 KB

Testing

Please beware all features or bug fixes must be tested by one or more specs (unit-tests, visual regression).

Unit tests

For unit testing we are using Jest along with React Testing Library and jest-dom.

Scripts

yarn test - one time unit tests run yarn test:watch - run with watcher

Useful sources

Visual regression

For visual regression we are using reg-cli and storycap. These test are typically run during CI/CD pipeline. If this visual-tests step fails due to intended changes, you have to update snapshots manually, by running yarn test:storybook:visual:update and commit updated snapshots.

Linting

Linting (eslint and stylelint) is runned in a pre-commit hook as well as in CI.

Scripts

yarn lint - check all files yarn lint:fix - check and try to fix errors in all files yarn lint:css - check styled-components syntax in all files

Typings

Typings check is automatically runned in CI.

Scripts

yarn types - check all files