From fe546c0de726c2a50c59dbb527512e3d8166a11c Mon Sep 17 00:00:00 2001 From: vsavkin Date: Sat, 10 Apr 2021 20:54:28 -0400 Subject: [PATCH] docs(testing): fix docs on how to debug jest tests --- docs/shared/jest-plugin.md | 2 +- nx-dev/archive/10.4.13/shared/jest-plugin.md | 2 +- nx-dev/archive/10.4.13/shared/tools-workspace-schematics.md | 2 +- nx-dev/archive/11.4.0/shared/jest-plugin.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/shared/jest-plugin.md b/docs/shared/jest-plugin.md index 280e8fceb4..6ac3b2b535 100644 --- a/docs/shared/jest-plugin.md +++ b/docs/shared/jest-plugin.md @@ -104,7 +104,7 @@ nx test libname --watch To debug failing tests using Chrome Devtools or an IDE you can run the test command through node's `--inspect-brk` flag. ```bash -node --inspect-brk ./node_modules/nx/bin/nx test libname +node --inspect-brk ./node_modules/@nrwl/cli/bin/nx test libname ``` Now, you can visit [chrome://inspect](chrome://inspect) in Chrome and inspect the target to attach to the node process. You can now use Chrome Devtools to step through your code line by line and debug the cause of the failing tests. Visit the official [Jest documentation](https://jestjs.io/docs/en/troubleshooting#tests-are-failing-and-you-don-t-know-why) to find out more. diff --git a/nx-dev/archive/10.4.13/shared/jest-plugin.md b/nx-dev/archive/10.4.13/shared/jest-plugin.md index a85dc68adb..3be58ecea5 100644 --- a/nx-dev/archive/10.4.13/shared/jest-plugin.md +++ b/nx-dev/archive/10.4.13/shared/jest-plugin.md @@ -104,7 +104,7 @@ nx test libname --watch To debug failing tests using Chrome Devtools or an IDE you can run the test command through node's `--inspect-brk` flag. ```bash -node --inspect-brk ./node_modules/nx/bin/nx test libname +node --inspect-brk ./node_modules/@nrwl/cli/bin/nx test libname ``` Now, you can visit [chrome://inspect](chrome://inspect) in Chrome and inspect the target to attach to the node process. You can now use Chrome Devtools to step through your code line by line and debug the cause of the failing tests. Visit the official [Jest documentation](https://jestjs.io/docs/en/troubleshooting#tests-are-failing-and-you-don-t-know-why) to find out more. diff --git a/nx-dev/archive/10.4.13/shared/tools-workspace-schematics.md b/nx-dev/archive/10.4.13/shared/tools-workspace-schematics.md index 36a8e3fdd9..10a4b30344 100644 --- a/nx-dev/archive/10.4.13/shared/tools-workspace-schematics.md +++ b/nx-dev/archive/10.4.13/shared/tools-workspace-schematics.md @@ -296,7 +296,7 @@ Alternatively press Cmd+P (or Ctrl+P Once you've activated the `autoAttach` option, set a breakpoint in VSCode and execute your schematic with the `--inspect-brk` flag: ```sh -node --inspect-brk ./node_modules/nx/bin/nx.js workspace-schematic my-schematic mylib --dry-run +node --inspect-brk ./node_modules/@nrwl/cli/bin/nx.js workspace-schematic my-schematic mylib --dry-run ``` You may want to use the `--dry-run` flag to not actually apply the changes to the file system. diff --git a/nx-dev/archive/11.4.0/shared/jest-plugin.md b/nx-dev/archive/11.4.0/shared/jest-plugin.md index a85dc68adb..3be58ecea5 100644 --- a/nx-dev/archive/11.4.0/shared/jest-plugin.md +++ b/nx-dev/archive/11.4.0/shared/jest-plugin.md @@ -104,7 +104,7 @@ nx test libname --watch To debug failing tests using Chrome Devtools or an IDE you can run the test command through node's `--inspect-brk` flag. ```bash -node --inspect-brk ./node_modules/nx/bin/nx test libname +node --inspect-brk ./node_modules/@nrwl/cli/bin/nx test libname ``` Now, you can visit [chrome://inspect](chrome://inspect) in Chrome and inspect the target to attach to the node process. You can now use Chrome Devtools to step through your code line by line and debug the cause of the failing tests. Visit the official [Jest documentation](https://jestjs.io/docs/en/troubleshooting#tests-are-failing-and-you-don-t-know-why) to find out more.