File tree Expand file tree Collapse file tree 10 files changed +16
-22
lines changed Expand file tree Collapse file tree 10 files changed +16
-22
lines changed Original file line number Diff line number Diff line change 88 < script src ='../../node_modules/mocha/mocha.js '> </ script >
99
1010 <!-- 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 >
1212
1313 < script type ='module ' src ='../js/hterm_tests.js '> </ script >
1414 < script type ='module ' src ='../js/hterm_accessibility_reader_tests.js '> </ script >
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // NB: This file is not loaded as a module because it modifies global scope.
6- 'use strict' ;
7-
85/**
96 * @fileoverview Test framework setup when run inside the browser.
107 */
@@ -14,7 +11,7 @@ mocha.setup('bdd');
1411mocha . checkLeaks ( ) ;
1512
1613// Add a global shortcut to the assert API.
17- const assert = chai . assert ;
14+ globalThis [ ' assert' ] = chai . assert ;
1815
1916// Catch any random errors before the test runner runs.
2017let earlyError = null ;
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ chai.config;
2525 */
2626chai . assert = function ( expression , message ) { } ;
2727
28+ /**
29+ * Shortcut that we always export in our test runner.
30+ *
31+ * @const
32+ */
33+ var assert = chai . assert ;
34+
2835/**
2936 * @param {* } actual
3037 * @param {* } expected
Original file line number Diff line number Diff line change 88 < script src ='../../node_modules/mocha/mocha.js '> </ script >
99
1010 <!-- 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 >
1212
1313 <!-- libdot js tests -->
1414 < script type ='module ' src ='../js/lib_codec_tests.js '> </ script >
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // NB: This file is not loaded as a module because it modifies global scope.
6- 'use strict' ;
7-
85/**
96 * @fileoverview Test framework setup when run inside the browser.
107 */
@@ -14,7 +11,7 @@ mocha.setup('bdd');
1411mocha . checkLeaks ( ) ;
1512
1613// Add a global shortcut to the assert API.
17- const assert = chai . assert ;
14+ globalThis [ ' assert' ] = chai . assert ;
1815
1916// Catch any random errors before the test runner runs.
2017let earlyError = null ;
Original file line number Diff line number Diff line change 88 < script src ='../../node_modules/mocha/mocha.js '> </ script >
99
1010 <!-- 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 >
1212 < script src ='../js/chrome_mock_for_test.js '> </ script >
1313
1414 <!-- All the unittests go below here. -->
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // NB: This file is not loaded as a module because it modifies global scope.
6- 'use strict' ;
7-
85/**
96 * @fileoverview Test framework setup when run inside the browser.
107 */
@@ -14,7 +11,7 @@ mocha.setup('bdd');
1411mocha . checkLeaks ( ) ;
1512
1613// Add a global shortcut to the assert API.
17- const assert = chai . assert ;
14+ globalThis [ ' assert' ] = chai . assert ;
1815
1916// Catch any random errors before the test runner runs.
2017let earlyError = null ;
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- 'use strict' ;
6-
75/**
86 * @fileoverview Test framework setup when run inside the browser.
97 */
108
119// 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 88 < script src ='../../node_modules/mocha/mocha.js '> </ script >
99
1010 <!-- Initialize the test framework; this must come first. -->
11- < script src ='runner.js '> </ script >
11+ < script type =' module ' src ='runner.js '> </ script >
1212
1313 <!-- All the test modules. -->
1414 < script type ='module ' src ='argv.js '> </ script >
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- 'use strict' ;
6-
75/**
86 * @fileoverview WASI main test runner.
97 */
@@ -18,7 +16,7 @@ chai.config.showDiff = true;
1816chai . config . truncateThreshold = 0 ;
1917
2018// Add a global shortcut to the assert API.
21- const assert = chai . assert ;
19+ globalThis [ ' assert' ] = chai . assert ;
2220
2321// Catch any random errors before the test runner runs.
2422let earlyError = null ;
You can’t perform that action at this time.
0 commit comments