1
1
//@ts -check
2
- var cp = require ( "child_process" ) ;
3
- var path = require ( "path" ) ;
4
- var fs = require ( "fs" ) ;
2
+ const cp = require ( "child_process" ) ;
3
+ const path = require ( "path" ) ;
4
+ const fs = require ( "fs" ) ;
5
5
6
- var duneBinDir = require ( "./dune" ) . duneBinDir ;
6
+ const duneBinDir = require ( "./dune" ) . duneBinDir ;
7
7
8
8
const { exec } = require ( "../jscomp/build_tests/utils.js" ) ;
9
9
10
- var ounitTest = false ;
11
- var mochaTest = false ;
12
- var bsbTest = false ;
13
- var formatTest = false ;
14
- var all = false ;
10
+ let ounitTest = false ;
11
+ let mochaTest = false ;
12
+ let bsbTest = false ;
13
+ let formatTest = false ;
15
14
16
15
if ( process . argv . includes ( "-ounit" ) ) {
17
16
ounitTest = true ;
@@ -30,9 +29,6 @@ if (process.argv.includes("-format")) {
30
29
}
31
30
32
31
if ( process . argv . includes ( "-all" ) ) {
33
- all = true ;
34
- }
35
- if ( all ) {
36
32
ounitTest = true ;
37
33
mochaTest = true ;
38
34
bsbTest = true ;
@@ -56,10 +52,10 @@ async function runTests() {
56
52
57
53
if ( bsbTest ) {
58
54
console . log ( "Doing build_tests" ) ;
59
- var buildTestDir = path . join ( __dirname , ".." , "jscomp" , "build_tests" ) ;
60
- var files = fs . readdirSync ( buildTestDir ) ;
55
+ const buildTestDir = path . join ( __dirname , ".." , "jscomp" , "build_tests" ) ;
56
+ const files = fs . readdirSync ( buildTestDir ) ;
61
57
for ( const file of files ) {
62
- var testDir = path . join ( buildTestDir , file ) ;
58
+ const testDir = path . join ( buildTestDir , file ) ;
63
59
if ( file === "node_modules" || ! fs . lstatSync ( testDir ) . isDirectory ( ) ) {
64
60
break ;
65
61
}
0 commit comments