Complex components require integration tests. We use Cypress as an end to end test framework to test components hierarchies and integrations with dependencies.
Tests should be added in the cypress/integration
folder, only when testing a component in
isolation through unit tests is not enough to provide thorough test coverage.
Tests can be ran locally with the following command, which open the cypress dashboard:
yarn run cypress open
To run tests as a headless browser, run the following command:
yarn test:integration
In both cases, the server needs to be running.