Move jest-runner-vscode config to correct location

This commit is contained in:
Koen Vlaswinkel
2022-11-23 10:11:35 +01:00
parent 65bb61b530
commit 0296db8b25
3 changed files with 23 additions and 19 deletions

View File

@@ -1,18 +0,0 @@
const path = require("path");
const tmp = require("tmp-promise");
const tmpDir = tmp.dirSync({ unsafeCleanup: true });
/** @type {import('jest-runner-vscode').RunnerOptions} */
module.exports = {
version: "stable",
launchArgs: [
"--disable-extensions",
"--disable-gpu",
"--new-window",
"--user-data-dir=" + path.join(tmpDir.name, "user-data"),
],
workspaceDir: path.resolve(__dirname, "test/data"),
openInFolder: true,
extensionDevelopmentPath: path.resolve(__dirname),
};

View File

@@ -84,7 +84,7 @@ const config: Config = {
moduleFileExtensions: ["js", "mjs", "cjs", "jsx", "ts", "tsx", "json"],
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
modulePathIgnorePatterns: [".vscode-test/"],
// Activates notifications for test results
// notify: false,

View File

@@ -0,0 +1,22 @@
import * as path from "path";
import * as tmp from "tmp-promise";
import { RunnerOptions } from "jest-runner-vscode";
const tmpDir = tmp.dirSync({ unsafeCleanup: true });
const config: RunnerOptions = {
version: "stable",
launchArgs: [
"--disable-extensions",
"--disable-gpu",
"--new-window",
"--user-data-dir=" + path.join(tmpDir.name, "user-data"),
],
workspaceDir: path.resolve(__dirname, "test/data"),
openInFolder: true,
extensionDevelopmentPath: path.resolve(__dirname),
};
// We are purposefully not using export default here since that would result in an ESModule, which doesn't seem to be
// supported properly by jest-runner-vscode (cosmiconfig doesn't really seem to support it).
module.exports = config;