forked from microsoft/vscode-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vscode-test.mjs
47 lines (40 loc) · 1.47 KB
/
.vscode-test.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//@ts-check
import fs from 'fs';
import { defineConfig } from '@vscode/test-cli';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
async function generateConfig() {
const venvFolder = `${__dirname}/.venv`;
const pythonPath = fs.existsSync(venvFolder)
? process.platform === 'win32'
? `${venvFolder}/Scripts/python.exe`
: `${venvFolder}/bin/python`
: '';
/** @type {import('@vscode/test-cli').TestConfiguration} */
let config = {
label: 'Extension Test',
files: ['out/**/*.vscode.test.js', 'out/**/*.vscode.common.test.js'],
version: 'insiders',
srcDir: 'src',
workspaceFolder: `${__dirname}/src/test/datascience`,
launchArgs: ['--enable-proposed-api'],
env: {
VSC_JUPYTER_FORCE_LOGGING: '1',
CI_PYTHON_PATH: pythonPath,
XVSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE: '1',
XVSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE_HTML: '1', //Enable to get full coverage repor (in coverage folder).
VSC_JUPYTER_EXPOSE_SVC: '1'
},
installExtensions: ['ms-python.vscode-pylance@prerelease']
};
config.mocha = {
ui: 'tdd',
color: true,
timeout: 25000,
preload: `${__dirname}/out/platform/ioc/reflectMetadata.js`
};
return config;
}
export default defineConfig(generateConfig());