@@ -24,6 +24,12 @@ const dataDir = process.env["VSCODE_DATA_DIR"];
24
24
// "env" in launch.json doesn't seem to work with vscode-test
25
25
const isDebugRun = ! ( process . env [ "_" ] ?? "" ) . endsWith ( "node_modules/.bin/vscode-test" ) ;
26
26
27
+ function log ( ...args ) {
28
+ if ( ! isDebugRun ) {
29
+ console . log ( ...args ) ;
30
+ }
31
+ }
32
+
27
33
// so tests don't timeout when a breakpoint is hit
28
34
const timeout = isDebugRun ? Number . MAX_SAFE_INTEGER : 3000 ;
29
35
@@ -55,24 +61,24 @@ if (vsixPath) {
55
61
if ( ! path . isAbsolute ( vsixPath ) ) {
56
62
vsixPath = path . join ( __dirname , vsixPath ) ;
57
63
}
58
- console . log ( "Installing VSIX " + vsixPath ) ;
64
+ log ( "Installing VSIX " + vsixPath ) ;
59
65
installExtensions . push ( vsixPath ) ;
60
66
61
67
// Determine version to use
62
68
const match = / s w i f t - v s c o d e - ( \d + .\d + .\d + ( - d e v ) ? ) ( - \d + ) ? .v s i x / g. exec ( path . basename ( vsixPath ) ) ;
63
69
if ( match ) {
64
70
versionStr = match [ 1 ] ;
65
71
}
66
- console . log ( "Running tests against extension version " + versionStr ) ;
72
+ log ( "Running tests against extension version " + versionStr ) ;
67
73
68
74
extensionDevelopmentPath = `${ __dirname } /.vscode-test/extensions/${ publisher } .${ name } -${ versionStr } ` ;
69
- console . log ( "Running tests against extension development path " + extensionDevelopmentPath ) ;
75
+ log ( "Running tests against extension development path " + extensionDevelopmentPath ) ;
70
76
} else {
71
77
extensionDependencies . push ( "vadimcn.vscode-lldb" , "llvm-vs-code-extensions.lldb-dap" ) ;
72
78
}
73
79
74
80
const vscodeVersion = process . env [ "VSCODE_VERSION" ] ?? "stable" ;
75
- console . log ( "Running tests against VS Code version " + vscodeVersion ) ;
81
+ log ( "Running tests against VS Code version " + vscodeVersion ) ;
76
82
77
83
const installConfigs = [ ] ;
78
84
for ( const ext of installExtensions ) {
@@ -91,7 +97,7 @@ const env = {
91
97
...process . env ,
92
98
RUNNING_UNDER_VSCODE_TEST_CLI : "1" ,
93
99
} ;
94
- console . log ( "Running tests against environment:\n" + JSON . stringify ( env , undefined , 2 ) ) ;
100
+ log ( "Running tests against environment:\n" + JSON . stringify ( env , undefined , 2 ) ) ;
95
101
96
102
module . exports = defineConfig ( {
97
103
tests : [
0 commit comments