docs(testing): fix docs on how to debug jest tests

This commit is contained in:
vsavkin 2021-04-10 20:54:28 -04:00 committed by Victor Savkin
parent 908103e713
commit fe546c0de7
4 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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.

View File

@ -296,7 +296,7 @@ Alternatively press <kbd>Cmd</kbd>+<kbd>P</kbd> (or <kbd>Ctrl</kbd>+<kbd>P</kbd>
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.

View File

@ -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.