Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 2.36 KB

TESTING.md

File metadata and controls

58 lines (36 loc) · 2.36 KB

Testing

Running components tests locally

Run every test in the package

yarn test:ci

Run and watch modified files

Go to core or react package and run

yarn test:watch

Technologies

We are using a react test setup with:

And these eslint plugins to ensure best practices

Principles

The more your tests resemble the way your software is used, the more confidence they can give you.

We are following @testing-library guiding principles, trying to avoid testing implementation details

Best practices

Recommended extensions

Jest vscode extension

We recommend using the official jest extension to ensure a better testing experience.

But this extension have a specific drawback, there is no official support for multiple jest-configs or support for monorepos, although we added a setupTests.ts that only execute for this extension, each package have their own jest config

Which query?

Which query is an awesome extension that aims to enable developers to find a better query when writing tests

There is also the docs and this article that may help you to fint the best query