diff --git a/jest.config.mjs b/jest.config.mjs index d6ff3a8..c724821 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -3,6 +3,6 @@ export default { preset: "ts-jest", testEnvironment: "node", moduleNameMapper: { - "(.+)\.js": "$1", + "(.+)\.js$": "$1", }, }; diff --git a/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/tests/unit/fetcher/stream-wrappers/webpack.test.ts index 903246b..ccd07b0 100644 --- a/tests/unit/fetcher/stream-wrappers/webpack.test.ts +++ b/tests/unit/fetcher/stream-wrappers/webpack.test.ts @@ -17,7 +17,11 @@ describe("test env compatibility", () => { ], }, resolve: { - extensions: [".tsx", ".ts", ".js"], + extensions: [".tsx", ".ts", ".jsx", ".js"], + extensionAlias: { + ".js": [".ts", ".js"], + ".jsx": [".tsx", ".jsx"], + }, }, }, (err, stats) => {