You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect active inspectors; update VSCode debugging recipe
Don't open inspectors if one is already connected. Like with AVA's own `debug` command, disable timeouts and switch to verbose output. This allows VSCode 1.47 to debug AVA test files.
Update VSCode debugging recipe accordingly. Promote Debug Terminal in favor of launch configuration.
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Mark Wubben <mark@novemberborn.net>
@@ -65,7 +68,13 @@ Assuming the names of your test files are unique you could try the following con
65
68
66
69
## Serial debugging
67
70
68
-
By default AVA runs tests concurrently. This may complicate debugging. Add a configuration with the `--serial` argument so AVA runs only one test at a time:
71
+
By default AVA runs tests concurrently. This may complicate debugging. Instead make sure AVA runs only one test at a time.
72
+
73
+
*Note that, if your tests aren't properly isolated, certain test failures may not appear when running the tests serially.*
74
+
75
+
If you use the debug terminal make sure to invoke AVA with `npx ava --serial`.
76
+
77
+
Or, if you're using a launch configuration, add the `--serial` argument:
69
78
70
79
```json
71
80
{
@@ -74,17 +83,12 @@ By default AVA runs tests concurrently. This may complicate debugging. Add a con
describe: 'Glob patterns to select what test files to run. Leave empty if you want AVA to run all test files instead. Add a colon and specify line numbers of specific tests to run',
124
136
type: 'string'
125
-
}))
137
+
}),argv=>{
138
+
if(activeInspector){
139
+
debug.files=argv.pattern||[];
140
+
}
141
+
})
126
142
.command(
127
143
'debug [<pattern>...]',
128
144
'Activate Node.js inspector and run a single test file',
0 commit comments