File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,17 @@ npm test
47
47
48
48
#### Debug Unit Tests
49
49
50
- If you are using IntelliJ or VSCode for development it is really simple to debug unit tests.
50
+ To debug on the command-line:
51
+ - Set a breakpoint using the [ debugger] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger ) statement.
52
+ - Run the tests with the inspect argument:
51
53
52
- For IntelliJ:
54
+ ``` bash
55
+ mocha inspect -r esm
56
+ ```
57
+
58
+ If you are using JetBrains or VSCode for development, you can debug the unit tests in your IDE.
59
+
60
+ For JetBrains:
53
61
- [ Create a run/debug configuration for mocha] ( https://www.jetbrains.com/help/idea/run-debug-configuration-mocha.html ) .
54
62
- Add ` --require esm ` to the ` Extra Mocha Options ` field in your run/debug configuration.
55
63
You can’t perform that action at this time.
0 commit comments