MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / launchTest

Method launchTest

src/test/smokeTest.node.ts:29–59  ·  view source on GitHub ↗
(customEnvVars: Record<string, {}>)

Source from the content-addressed store, hash-verified

27 await this.launchTest(env);
28 }
29 private async launchTest(customEnvVars: Record<string, {}>) {
30 await new Promise<void>((resolve, reject) => {
31 const env: Record<string, string> = {
32 TEST_FILES_SUFFIX: 'smoke.test*',
33 IS_SMOKE_TEST: 'true',
34 CODE_TESTS_WORKSPACE: path.join(
35 EXTENSION_ROOT_DIR_FOR_TESTS,
36 'src',
37 'test',
38 'testMultiRootWkspc',
39 'smokeTests'
40 ),
41 ...process.env,
42 ...customEnvVars
43 };
44 const proc = spawn('node', [path.join(__dirname, 'standardTest.node.js')], {
45 cwd: EXTENSION_ROOT_DIR_FOR_TESTS,
46 env,
47 stdio: 'inherit'
48 });
49 proc.on('error', reject);
50 proc.on('exit', (code) => {
51 console.log(`Tests Exited with code ${code}`);
52 if (code === 0) {
53 resolve();
54 } else {
55 reject(`Failed with code ${code}.`);
56 }
57 });
58 });
59 }
60
61 private async extractLatestExtension(targetDir: string): Promise<void> {
62 if (process.env.VSIX_NAME) {

Callers 1

launchSmokeTestsMethod · 0.95

Calls 5

spawnFunction · 0.85
joinMethod · 0.80
logMethod · 0.80
onMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected