1
- import * as ts from "./_namespaces/ts " ;
1
+ import * as chai from "chai " ;
2
2
3
- // Block scoped definitions work poorly for global variables, temporarily enable var
4
- /* eslint-disable no-var */
3
+ import * as ts from "./_namespaces/ts" ;
5
4
6
5
// this will work in the browser via browserify
7
6
declare global {
8
7
// Module transform: converted from ambient declaration
9
- var assert : typeof _chai . assert ;
8
+ var assert : typeof chai . assert ; // eslint-disable-line no-var
10
9
}
11
10
declare global {
12
11
// Module transform: converted from ambient declaration
13
- var expect : typeof _chai . expect ;
12
+ var expect : typeof chai . expect ; // eslint-disable-line no-var
14
13
}
15
- var _chai : typeof import ( "chai" ) = require ( "chai" ) ;
16
- globalThis . assert = _chai . assert ;
14
+ globalThis . assert = chai . assert ;
17
15
{
18
16
// chai's builtin `assert.isFalse` is featureful but slow - we don't use those features,
19
17
// so we'll just overwrite it as an alterative to migrating a bunch of code off of chai
@@ -39,7 +37,7 @@ globalThis.assert = _chai.assert;
39
37
}
40
38
} ;
41
39
}
42
- globalThis . expect = _chai . expect ;
43
- /* eslint-enable no-var */
40
+ globalThis . expect = chai . expect ;
41
+
44
42
// empty ts namespace so this file is included in the `ts.ts` namespace file generated by the module swapover
45
- // This way, everything that ends up importing `ts` downstream also imports this file and picks up its augmentation
43
+ // This way, everything that ends up importing `ts` downstream also imports this file and picks up its augmentation
0 commit comments