Skip to content

Commit a46209b

Browse files
authored
Merge pull request #2701 from github/koesie10/fix-duplicate-test-running
Fix running tests twice when test paths are passed
2 parents 408d38d + 1b0bcb3 commit a46209b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

extensions/ql-vscode/patches/jest-runner-vscode+3.0.1.patch

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ index 1ac28d5..f91f216 100644
2525
await super.setup();
2626
await (0, load_pnp_1.default)();
2727
diff --git a/node_modules/jest-runner-vscode/dist/child/runner.js b/node_modules/jest-runner-vscode/dist/child/runner.js
28-
index 0663c5c..4991663 100644
28+
index 0663c5c..bdf4a8b 100644
2929
--- a/node_modules/jest-runner-vscode/dist/child/runner.js
3030
+++ b/node_modules/jest-runner-vscode/dist/child/runner.js
3131
@@ -18,10 +18,13 @@ async function run() {
@@ -43,6 +43,16 @@ index 0663c5c..4991663 100644
4343
const options = JSON.parse(PARENT_JEST_OPTIONS);
4444
const jestOptions = [
4545
...options.args,
46+
@@ -39,6 +42,9 @@ async function run() {
47+
...(argv.projects?.map(project => path_1.default.resolve(project)) || []),
48+
options.workspacePath,
49+
]);
50+
+ const testPaths = new Set(argv._.map(testPath => path_1.default.resolve(testPath)));
51+
+ argv._ = [...testPaths];
52+
+
53+
await (0, core_1.runCLI)(argv, [...projects]);
54+
}
55+
catch (error) {
4656
diff --git a/node_modules/jest-runner-vscode/dist/public-types.d.ts b/node_modules/jest-runner-vscode/dist/public-types.d.ts
4757
index 57716e5..d8614af 100644
4858
--- a/node_modules/jest-runner-vscode/dist/public-types.d.ts

0 commit comments

Comments
 (0)