We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45158a6 commit 9312fb2Copy full SHA for 9312fb2
src/commands/runTest.ts
@@ -32,9 +32,19 @@ function getExistingLaunchConfig(
32
"launch",
33
args.workspaceFolder,
34
);
35
- const testConfig = launchJson.configurations.findLast(
36
- (e: { name: string }) => e.name === "mix test",
+ const configurations = launchJson.get<vscode.DebugConfiguration[]>(
+ "configurations",
37
38
+ let testConfig: vscode.DebugConfiguration | undefined;
39
+ if (Array.isArray(configurations)) {
40
+ for (let i = configurations.length - 1; i >= 0; i--) {
41
+ const c = configurations[i];
42
+ if (c?.name === "mix test") {
43
+ testConfig = c;
44
+ break;
45
+ }
46
47
48
49
if (testConfig === undefined) {
50
return undefined;
0 commit comments