From 2ff6b11f4625079a1d440366d547c44e00c468ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Fri, 9 Dec 2022 12:49:07 +0100 Subject: [PATCH] docs(misc): add info about running E2E in CI-like env to CONTRIBUTING (#13730) --- CONTRIBUTING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc7086f008..26419684b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -119,7 +119,7 @@ nx test jest ### Running E2E Tests -**Use Node 14 and NPM 6. E2E tests won't work on Node 15 and NPM 7.** +**Use Node 16 and NPM 8. E2E tests won't work on Node 15 and NPM 7.** To make sure your changes do not break any E2E tests, run: @@ -133,6 +133,14 @@ Running E2E tests can take some time, so it is often useful to run a single test nx e2e e2e-cli -t versions # I often add qqqq to my test name so I can use -t qqqq ``` +Sometimes tests pass locally but they fail on the CI. To reproduce the CI environment and be able to debug the issue, run: + +```bash +NX_VERBOSE_LOGGING=true CI=true PACKAGE_MANAGER=pnpm yarn nx e2e e2e-cli --t="should do something is this test" +``` + +The above command sets verbose logging (this exposes stack traces and underlying errors), sets the defaults to be CI-like and sets Pnpm as the selected package manager. + ### Developing on Windows To build Nx on Windows, you need to use WSL.