Skip to content

Commit 151dc38

Browse files
committed
Test
1 parent 46dd6a8 commit 151dc38

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.vscode-test.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//@ts-check
2+
3+
import fs from "fs";
4+
import { defineConfig } from "@vscode/test-cli";
5+
import { fileURLToPath } from "url";
6+
import { dirname, join } from "path";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
11+
/**
12+
* @param {string} label
13+
*/
14+
function generateConfig(label) {
15+
const workspaceFolder = join(__dirname, "src", "test", "datascience");
16+
/** @type {import('@vscode/test-cli').TestConfiguration} */
17+
let config = {
18+
label,
19+
files: ["out/**/*.test.js"],
20+
version: "insiders",
21+
srcDir: "src",
22+
workspaceFolder,
23+
launchArgs: [
24+
workspaceFolder,
25+
"--enable-proposed-api",
26+
"--disable-extension=GitHub.vscode-pull-request-github-insiders",
27+
],
28+
// env,
29+
mocha: {
30+
ui: "tdd",
31+
color: true,
32+
timeout: 25000,
33+
preload: [
34+
// `${__dirname}/out/platform/ioc/reflectMetadata.js`,
35+
// `${__dirname}/out/test/common.test.require.js`
36+
],
37+
},
38+
};
39+
40+
return config;
41+
}
42+
43+
44+
export default defineConfig(generateConfig("Local Tests"));

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4213,6 +4213,7 @@
42134213
"@types/webpack-env": "^1.16.0",
42144214
"@typescript-eslint/eslint-plugin": "6.10.0",
42154215
"@typescript-eslint/parser": "6.10.0",
4216+
"@vscode/test-cli": "^0.0.11",
42164217
"@vscode/test-electron": "^2.5.2",
42174218
"@vscode/test-web": "^0.0.71",
42184219
"assert": "^2.0.0",
@@ -4296,4 +4297,4 @@
42964297
"string_decoder": "^1.3.0"
42974298
},
42984299
"license": "MIT"
4299-
}
4300+
}

0 commit comments

Comments
 (0)