File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 11import * as path from 'path' ;
2- import { runTests } from 'vscode-test' ;
2+ import {
3+ runTests ,
4+ downloadAndUnzipVSCode
5+ } from 'vscode-test' ;
36
47async function main ( ) {
58 const extensionDevelopmentPath = path . resolve ( __dirname , '../../' ) ;
69 const extensionTestsPath = path . resolve ( __dirname , './suite/index' ) ;
710
11+ // latest version test
812 try {
913 await runTests ( {
1014 extensionDevelopmentPath,
@@ -15,6 +19,36 @@ async function main() {
1519 console . error ( 'Failed to run tests' ) ;
1620 process . exit ( 1 ) ;
1721 }
22+ setTimeout ( ( ) => { } , 3000 ) ;
23+
24+ // v1.45.0 test
25+ let vscodeExecutablePath = await downloadAndUnzipVSCode ( '1.45.0' ) ;
26+ try {
27+ await runTests ( {
28+ vscodeExecutablePath,
29+ extensionDevelopmentPath,
30+ extensionTestsPath,
31+ launchArgs : [ '--disable-extensions' ]
32+ } ) ;
33+ } catch ( err ) {
34+ console . error ( 'Failed to run tests' ) ;
35+ process . exit ( 1 ) ;
36+ }
37+ setTimeout ( ( ) => { } , 3000 ) ;
38+
39+ // legacy version test
40+ vscodeExecutablePath = await downloadAndUnzipVSCode ( '1.40.0' ) ;
41+ try {
42+ await runTests ( {
43+ vscodeExecutablePath,
44+ extensionDevelopmentPath,
45+ extensionTestsPath,
46+ launchArgs : [ '--disable-extensions' ]
47+ } ) ;
48+ } catch ( err ) {
49+ console . error ( 'Failed to run tests' ) ;
50+ process . exit ( 1 ) ;
51+ }
1852}
1953
2054main ( ) ;
You can’t perform that action at this time.
0 commit comments