@@ -2,27 +2,36 @@ import * as path from 'path';
22
33import { runTests } from 'vscode-test' ;
44
5- async function main ( ) {
6- try {
7- const extensionDevelopmentPath = path . resolve ( __dirname , '../../' ) ;
5+ const extensionDevelopmentPath = path . resolve ( __dirname , '../../' ) ;
86
9- await runTests ( {
10- extensionDevelopmentPath,
11- extensionTestsPath : path . resolve ( __dirname , './gradle' ) ,
12- launchArgs : [
13- path . resolve ( __dirname , '../../test-fixtures/gradle' ) ,
14- '--disable-extensions'
15- ]
16- } ) ;
7+ async function runTestsWithGradleWorkspace ( ) {
8+ const fixtureName =
9+ process . platform === 'win32' ? 'gradle-windows' : 'gradle' ;
10+ await runTests ( {
11+ extensionDevelopmentPath,
12+ extensionTestsPath : path . resolve ( __dirname , './gradle' ) ,
13+ launchArgs : [
14+ path . resolve ( __dirname , `../../test-fixtures/${ fixtureName } ` ) ,
15+ '--disable-extensions'
16+ ]
17+ } ) ;
18+ }
1719
18- await runTests ( {
19- extensionDevelopmentPath,
20- extensionTestsPath : path . resolve ( __dirname , './no-gradle' ) ,
21- launchArgs : [
22- path . resolve ( __dirname , '../../test-fixtures/no-gradle' ) ,
23- '--disable-extensions'
24- ]
25- } ) ;
20+ async function runTestsWithoutGradleWorkspace ( ) {
21+ await runTests ( {
22+ extensionDevelopmentPath,
23+ extensionTestsPath : path . resolve ( __dirname , './no-gradle' ) ,
24+ launchArgs : [
25+ path . resolve ( __dirname , '../../test-fixtures/no-gradle' ) ,
26+ '--disable-extensions'
27+ ]
28+ } ) ;
29+ }
30+
31+ async function main ( ) {
32+ try {
33+ await runTestsWithGradleWorkspace ( ) ;
34+ // await runTestsWithoutGradleWorkspace();
2635 } catch ( err ) {
2736 console . error ( 'Failed to run tests' ) ;
2837 process . exit ( 1 ) ;
0 commit comments