14
14
15
15
const { defineConfig } = require ( "@vscode/test-cli" ) ;
16
16
const path = require ( "path" ) ;
17
+ const { version } = require ( "./package.json" ) ;
17
18
18
19
const isCIBuild = process . env [ "CI" ] === "1" ;
19
20
const isFastTestRun = process . env [ "FAST_TEST_RUN" ] === "1" ;
@@ -24,13 +25,18 @@ const isDebugRun = !(process.env["_"] ?? "").endsWith("node_modules/.bin/vscode-
24
25
// so tests don't timeout when a breakpoint is hit
25
26
const timeout = isDebugRun ? Number . MAX_SAFE_INTEGER : 3000 ;
26
27
28
+ const vsixPath = process . env [ "VSCODE_SWIFT_VSIX" ] ;
29
+
27
30
module . exports = defineConfig ( {
28
31
tests : [
29
32
{
30
33
label : "integrationTests" ,
31
34
files : [ "dist/test/common.js" , "dist/test/integration-tests/**/*.test.js" ] ,
32
35
version : process . env [ "VSCODE_VERSION" ] ?? "stable" ,
33
36
workspaceFolder : "./assets/test" ,
37
+ extensionDevelopmentPath : vsixPath
38
+ ? [ `${ __dirname } /.vscode-test/extensions/swiftlang.vscode-swift-${ version } ` ]
39
+ : undefined ,
34
40
launchArgs : [
35
41
"--disable-updates" ,
36
42
"--disable-crash-reporter" ,
@@ -53,7 +59,7 @@ module.exports = defineConfig({
53
59
} ,
54
60
} ,
55
61
reuseMachineInstall : ! isCIBuild ,
56
- installExtensions : [ "vadimcn.vscode-lldb" ] ,
62
+ installExtensions : [ "vadimcn.vscode-lldb" ] . concat ( vsixPath ? [ vsixPath ] : [ ] ) ,
57
63
} ,
58
64
{
59
65
label : "unitTests" ,
0 commit comments