File tree 10 files changed +16
-22
lines changed
10 files changed +16
-22
lines changed Original file line number Diff line number Diff line change 8
8
< script src ='../../node_modules/mocha/mocha.js '> </ script >
9
9
10
10
<!-- initialize the test framework; this must come first -->
11
- < script src ='../js/hterm_test.js '> </ script >
11
+ < script type =' module ' src ='../js/hterm_test.js '> </ script >
12
12
13
13
< script type ='module ' src ='../js/hterm_tests.js '> </ script >
14
14
< script type ='module ' src ='../js/hterm_accessibility_reader_tests.js '> </ script >
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- // NB: This file is not loaded as a module because it modifies global scope.
6
- 'use strict' ;
7
-
8
5
/**
9
6
* @fileoverview Test framework setup when run inside the browser.
10
7
*/
@@ -14,7 +11,7 @@ mocha.setup('bdd');
14
11
mocha . checkLeaks ( ) ;
15
12
16
13
// Add a global shortcut to the assert API.
17
- const assert = chai . assert ;
14
+ globalThis [ ' assert' ] = chai . assert ;
18
15
19
16
// Catch any random errors before the test runner runs.
20
17
let earlyError = null ;
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ chai.config;
25
25
*/
26
26
chai . assert = function ( expression , message ) { } ;
27
27
28
+ /**
29
+ * Shortcut that we always export in our test runner.
30
+ *
31
+ * @const
32
+ */
33
+ var assert = chai . assert ;
34
+
28
35
/**
29
36
* @param {* } actual
30
37
* @param {* } expected
Original file line number Diff line number Diff line change 8
8
< script src ='../../node_modules/mocha/mocha.js '> </ script >
9
9
10
10
<!-- initialize the test framework; this must come first -->
11
- < script src ='../js/lib_test.js '> </ script >
11
+ < script type =" module " src ='../js/lib_test.js '> </ script >
12
12
13
13
<!-- libdot js tests -->
14
14
< script type ='module ' src ='../js/lib_codec_tests.js '> </ script >
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- // NB: This file is not loaded as a module because it modifies global scope.
6
- 'use strict' ;
7
-
8
5
/**
9
6
* @fileoverview Test framework setup when run inside the browser.
10
7
*/
@@ -14,7 +11,7 @@ mocha.setup('bdd');
14
11
mocha . checkLeaks ( ) ;
15
12
16
13
// Add a global shortcut to the assert API.
17
- const assert = chai . assert ;
14
+ globalThis [ ' assert' ] = chai . assert ;
18
15
19
16
// Catch any random errors before the test runner runs.
20
17
let earlyError = null ;
Original file line number Diff line number Diff line change 8
8
< script src ='../../node_modules/mocha/mocha.js '> </ script >
9
9
10
10
<!-- initialize the test framework; this must come first -->
11
- < script src ='../js/nassh_test.js '> </ script >
11
+ < script type =' module ' src ='../js/nassh_test.js '> </ script >
12
12
< script src ='../js/chrome_mock_for_test.js '> </ script >
13
13
14
14
<!-- All the unittests go below here. -->
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- // NB: This file is not loaded as a module because it modifies global scope.
6
- 'use strict' ;
7
-
8
5
/**
9
6
* @fileoverview Test framework setup when run inside the browser.
10
7
*/
@@ -14,7 +11,7 @@ mocha.setup('bdd');
14
11
mocha . checkLeaks ( ) ;
15
12
16
13
// Add a global shortcut to the assert API.
17
- const assert = chai . assert ;
14
+ globalThis [ ' assert' ] = chai . assert ;
18
15
19
16
// Catch any random errors before the test runner runs.
20
17
let earlyError = null ;
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- 'use strict' ;
6
-
7
5
/**
8
6
* @fileoverview Test framework setup when run inside the browser.
9
7
*/
10
8
11
9
// Add a global shortcut to the assert API.
12
- const assert = chai . assert ;
10
+ globalThis [ ' assert' ] = chai . assert ;
Original file line number Diff line number Diff line change 8
8
< script src ='../../node_modules/mocha/mocha.js '> </ script >
9
9
10
10
<!-- Initialize the test framework; this must come first. -->
11
- < script src ='runner.js '> </ script >
11
+ < script type =' module ' src ='runner.js '> </ script >
12
12
13
13
<!-- All the test modules. -->
14
14
< script type ='module ' src ='argv.js '> </ script >
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- 'use strict' ;
6
-
7
5
/**
8
6
* @fileoverview WASI main test runner.
9
7
*/
@@ -18,7 +16,7 @@ chai.config.showDiff = true;
18
16
chai . config . truncateThreshold = 0 ;
19
17
20
18
// Add a global shortcut to the assert API.
21
- const assert = chai . assert ;
19
+ globalThis [ ' assert' ] = chai . assert ;
22
20
23
21
// Catch any random errors before the test runner runs.
24
22
let earlyError = null ;
You can’t perform that action at this time.
0 commit comments