diff --git a/packages/backend/jest.config.ts b/packages/backend/jest.config.ts index b53836ca3a..babeca4ad8 100644 --- a/packages/backend/jest.config.ts +++ b/packages/backend/jest.config.ts @@ -91,7 +91,7 @@ export default { // See https://github.com/swc-project/jest/issues/64#issuecomment-1029753225 // TODO: Use `--allowImportingTsExtensions` on TypeScript 5.0 so that we can // directly import `.ts` files without this hack. - '^((?:\\.{1,2}|[A-Z:])*/.*)\\.js$': '$1', + '^(\\.{1,2}[\\/\\\\].*)\\.js$': '$1', }, // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader diff --git a/packages/megalodon/jest.config.ts b/packages/megalodon/jest.config.ts index fae4d82b6e..64504bc112 100644 --- a/packages/megalodon/jest.config.ts +++ b/packages/megalodon/jest.config.ts @@ -104,7 +104,7 @@ export default { // See https://github.com/swc-project/jest/issues/64#issuecomment-1029753225 // TODO: Use `--allowImportingTsExtensions` on TypeScript 5.0 so that we can // directly import `.ts` files without this hack. - '^((?:\\.{1,2}|[A-Z:])*/.*)\\.js$': '$1', + '^(\\.{1,2}[\\/\\\\].*)\\.js$': '$1', }, // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader diff --git a/packages/misskey-js/jest.config.ts b/packages/misskey-js/jest.config.ts index b12801c5d2..953ce215bf 100644 --- a/packages/misskey-js/jest.config.ts +++ b/packages/misskey-js/jest.config.ts @@ -104,7 +104,7 @@ export default { // See https://github.com/swc-project/jest/issues/64#issuecomment-1029753225 // TODO: Use `--allowImportingTsExtensions` on TypeScript 5.0 so that we can // directly import `.ts` files without this hack. - '^((?:\\.{1,2}|[A-Z:])*/.*)\\.js$': '$1', + '^(\\.{1,2}[\\/\\\\].*)\\.js$': '$1', }, // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader