Skip to content

Commit 0d9c412

Browse files
committed
Fix hybrid test initialization
1 parent cb16cb5 commit 0d9c412

4 files changed

+12
-13
lines changed

fix-hybrid-module.test.cjs.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cat >dist/test/cjs/package.json <<!EOF
2+
{
3+
"type": "commonjs"
4+
}
5+
!EOF

fix-hybrid-module.test.esm.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cat >dist/test/esm/package.json <<!EOF
2+
{
3+
"type": "module"
4+
}
5+
!EOF

fix-hybrid-module.test.sh

-11
This file was deleted.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"build": "npm run build:esm && npm run build:cjs && ./fix-hybrid-module.sh",
1313
"build:esm": "tsc -p ./tsconfig.esm.json",
1414
"build:cjs": "tsc -p ./tsconfig.cjs.json",
15-
"build:test:cjs": "tsc -p ./tsconfig.test.cjs.json && ./fix-hybrid-module.test.sh",
16-
"build:test:esm": "tsc -p ./tsconfig.test.esm.json && ./fix-hybrid-module.test.sh",
15+
"build:test:cjs": "tsc -p ./tsconfig.test.cjs.json && ./fix-hybrid-module.test.cjs.sh",
16+
"build:test:esm": "tsc -p ./tsconfig.test.esm.json && ./fix-hybrid-module.test.esm.sh",
1717
"test": "npm run lint && npm run build:test:cjs && npm run testonly:cjs && npm run build:test:esm && npm run testonly:esm",
1818
"testonly:cjs": "mocha --check-leaks --exit --full-trace 'dist/test/cjs/**/__tests__/**/*-test.js'",
1919
"testonly:esm": "mocha --check-leaks --exit --full-trace 'dist/test/esm/**/__tests__/**/*-test.js'",

0 commit comments

Comments
 (0)