@@ -14,57 +14,53 @@ suite('Highlighting', function () {
14
14
await activate ( ) ;
15
15
} ) ;
16
16
17
- this . afterEach ( async function ( ) {
18
- await vscode . commands . executeCommand ( 'workbench.action.closeActiveEditor' ) ;
19
- } ) ;
20
-
21
- test ( 'file paths recovered' , function ( ) {
22
- const highlightingTestRoot = getDocUri ( 'src/highlighting' ) . fsPath ;
23
- adaFilePaths = [ ] ;
24
-
25
- function walk ( dir : string ) {
26
- const openDir = opendirSync ( dir ) ;
27
- try {
28
- let child ;
29
- while ( ( child = openDir . readSync ( ) ) != null ) {
30
- const childPath = path . join ( dir , child . name ) ;
31
- if ( child . isDirectory ( ) ) {
32
- walk ( childPath ) ;
33
- } else if ( child . isFile ( ) ) {
34
- if ( child . name . match ( / \. a d [ b s ] $ / ) ) {
35
- adaFilePaths . push ( childPath ) ;
36
- }
17
+ const highlightingTestRoot = getDocUri ( 'src/highlighting' ) . fsPath ;
18
+ adaFilePaths = [ ] ;
19
+
20
+ function walk ( dir : string ) {
21
+ const openDir = opendirSync ( dir ) ;
22
+ try {
23
+ let child ;
24
+ while ( ( child = openDir . readSync ( ) ) != null ) {
25
+ const childPath = path . join ( dir , child . name ) ;
26
+ if ( child . isDirectory ( ) ) {
27
+ walk ( childPath ) ;
28
+ } else if ( child . isFile ( ) ) {
29
+ if ( child . name . match ( / \. a d [ b s ] $ / ) ) {
30
+ adaFilePaths . push ( childPath ) ;
37
31
}
38
32
}
39
- } finally {
40
- openDir . closeSync ( ) ;
41
33
}
34
+ } finally {
35
+ openDir . closeSync ( ) ;
42
36
}
37
+ }
43
38
44
- walk ( highlightingTestRoot ) ;
45
- assert . notStrictEqual ( adaFilePaths , [ ] ) ;
46
- } ) ;
39
+ walk ( highlightingTestRoot ) ;
40
+ assert . notStrictEqual ( adaFilePaths , [ ] ) ;
47
41
48
- this . afterAll ( function ( ) {
49
- for ( const absPath of adaFilePaths ) {
50
- const testName = `${ basename ( dirname ( absPath ) ) } /${ basename ( absPath ) } ` ;
51
- const absFileUri = vscode . Uri . file ( absPath ) ;
42
+ for ( const absPath of adaFilePaths ) {
43
+ const testName = `${ basename ( dirname ( absPath ) ) } /${ basename ( absPath ) } ` ;
44
+ const absFileUri = vscode . Uri . file ( absPath ) ;
52
45
53
- suite ( testName , function ( ) {
54
- test ( 'syntax.main' , function ( ) {
55
- testSyntaxHighlighting ( absPath , 'syntaxes ') ;
56
- } ) ;
46
+ suite ( testName , function ( ) {
47
+ this . afterAll ( async function ( ) {
48
+ await vscode . commands . executeCommand ( 'workbench.action.closeActiveEditor ') ;
49
+ } ) ;
57
50
58
- test ( 'syntax.advanced ' , function ( ) {
59
- testSyntaxHighlighting ( absPath , 'advanced ' ) ;
60
- } ) ;
51
+ test ( 'syntax.main ' , function ( ) {
52
+ testSyntaxHighlighting ( absPath , 'syntaxes ' ) ;
53
+ } ) ;
61
54
62
- test ( 'semantic' , async function ( ) {
63
- await testSemanticHighlighting ( absFileUri ) ;
64
- } ) ;
55
+ test ( 'syntax.advanced' , function ( ) {
56
+ testSyntaxHighlighting ( absPath , 'advanced' ) ;
65
57
} ) ;
66
- }
67
- } ) ;
58
+
59
+ test ( 'semantic' , async function ( ) {
60
+ await testSemanticHighlighting ( absFileUri ) ;
61
+ } ) ;
62
+ } ) ;
63
+ }
68
64
} ) ;
69
65
70
66
/**
0 commit comments