Everything you need to know about our testing setup and strategy
happy-dom
environment.
@react-email/render
package’s renderAsync
does a fair bit of magic to simulate edge
and other environments that are not supported by happy-dom
. For this use case, we override the environment on a per-file basis for its testspnpm test
inside any package. This will run the tests only once. We have two
scripts defined on our packages for testing:
pnpm test
: Runs all the tests once. If you run it on the root, it will run the
tests for all packages using
turborepopnpm test:watch
: Runs all the tests and watches for changes. Vitest
automatically only runs the tests that are affected by the code you’ve
changed.