File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import * as path from 'path' ;
2
- import * as Mocha from 'mocha' ;
3
- import * as glob from 'glob' ;
2
+ import Mocha from 'mocha' ;
3
+ import glob from 'glob' ;
4
4
5
5
export function run ( ) : Promise < void > {
6
6
const mocha = new Mocha ( {
@@ -9,14 +9,14 @@ export function run(): Promise<void> {
9
9
} ) ;
10
10
const testsRoot = path . resolve ( __dirname , '..' ) ;
11
11
return new Promise ( ( resolve , reject ) => {
12
- glob ( '**/**.test.js' , { cwd : testsRoot } , ( err , files ) => {
12
+ glob ( '**/**.test.js' , { cwd : testsRoot } , ( err : Error | null , files : string [ ] ) => {
13
13
if ( err ) {
14
14
return reject ( err ) ;
15
15
}
16
- files . forEach ( f => mocha . addFile ( path . resolve ( testsRoot , f ) ) ) ;
16
+ files . forEach ( ( f : string ) => mocha . addFile ( path . resolve ( testsRoot , f ) ) ) ;
17
17
try {
18
18
// Run the mocha test
19
- mocha . run ( failures => {
19
+ mocha . run ( ( failures : number ) => {
20
20
if ( failures > 0 ) {
21
21
reject ( new Error ( `${ failures } tests failed.` ) ) ;
22
22
} else {
You can’t perform that action at this time.
0 commit comments