From 13fcb3e6badd9c3fe97a53110c7fb61b5fa48351 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 25 Mar 2022 13:10:45 +0100 Subject: [PATCH] docs/local-dev: add note about jest config selecting the env Signed-off-by: Patrik Oldsberg --- docs/local-dev/cli-build-system.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/local-dev/cli-build-system.md b/docs/local-dev/cli-build-system.md index 91f4668f4e074..9245cea7ff3d6 100644 --- a/docs/local-dev/cli-build-system.md +++ b/docs/local-dev/cli-build-system.md @@ -521,7 +521,9 @@ The built-in configuration brings a couple of benefits and features. The most important one being a baseline transformer and module configuration that enables support for the listed [loaders](#loaders) within tests. It will also automatically detect and use `src/setupTests.ts` if it exists, and provides a -coverage configuration that works well with our selected transpilers. +coverage configuration that works well with our selected transpilers. The configuration +will also detect the appropriate Jest environment for each package role, running +`web-libraries` with the `"jsdom"` environment, `node-libraries` with `"node"`, and so on. The configuration also takes a project-wide approach, with the expectation most if not all packages within a monorepo will use the same base configuration. This