Commit f02d4dd 1 parent 521386d commit f02d4dd Copy full SHA for f02d4dd
File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 31
31
run : npm run test
32
32
- name : Import with CJS
33
33
if : ${{ always() }}
34
- run : node smoke-tests/smoke-test-cjs.js
34
+ run : node smoke-tests/smoke-test-cjs.cjs
35
35
- name : Import with ESM
36
36
if : ${{ always() }}
37
37
run : node smoke-tests/smoke-test-esm.mjs
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ const assert = require("node:assert");
5
5
const { TypeScriptLoader : esm } = await import ( "../dist/esm/index.mjs" ) ;
6
6
const { TypeScriptLoader : cjs } = require ( "../dist/cjs/index.cjs" ) ;
7
7
8
- assert . strictEqual ( esm , cjs , "esm === cjs" ) ;
8
+ // Assert the functions loaded by checking their names load and types are correct
9
+ assert . strictEqual ( esm . name === "TypeScriptLoader" , true ) ;
10
+ assert . strictEqual ( typeof esm === "function" , true ) ;
11
+ assert . strictEqual ( cjs . name === "TypeScriptLoader" , true ) ;
12
+ assert . strictEqual ( typeof cjs === "function" , true ) ;
9
13
10
14
// Try to create loaders
11
15
esm ( ) ;
You can’t perform that action at this time.
0 commit comments