Skip to content

Commit 0296db8

Browse files
committed
Move jest-runner-vscode config to correct location
1 parent 65bb61b commit 0296db8

3 files changed

Lines changed: 23 additions & 19 deletions

File tree

extensions/ql-vscode/jest-runner-vscode.config.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

extensions/ql-vscode/src/vscode-tests/jest.config.base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const config: Config = {
8484
moduleFileExtensions: ["js", "mjs", "cjs", "jsx", "ts", "tsx", "json"],
8585

8686
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87-
// modulePathIgnorePatterns: [],
87+
modulePathIgnorePatterns: [".vscode-test/"],
8888

8989
// Activates notifications for test results
9090
// notify: false,
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import * as path from "path";
2+
import * as tmp from "tmp-promise";
3+
import { RunnerOptions } from "jest-runner-vscode";
4+
5+
const tmpDir = tmp.dirSync({ unsafeCleanup: true });
6+
7+
const config: RunnerOptions = {
8+
version: "stable",
9+
launchArgs: [
10+
"--disable-extensions",
11+
"--disable-gpu",
12+
"--new-window",
13+
"--user-data-dir=" + path.join(tmpDir.name, "user-data"),
14+
],
15+
workspaceDir: path.resolve(__dirname, "test/data"),
16+
openInFolder: true,
17+
extensionDevelopmentPath: path.resolve(__dirname),
18+
};
19+
20+
// We are purposefully not using export default here since that would result in an ESModule, which doesn't seem to be
21+
// supported properly by jest-runner-vscode (cosmiconfig doesn't really seem to support it).
22+
module.exports = config;

0 commit comments

Comments
 (0)