Skip to content

Commit e0b63a2

Browse files
committed
fix(auth-server): Restore fxa-shared/* jest moduleNameMapper
Because: - When jest.config.js switched to pathsToModuleNameMapper, the explicit '^fxa-shared/(.*)$' → '<rootDir>/../fxa-shared/$1' mapping was dropped. Without it, 'require("fxa-shared/...")' resolves through fxa-shared's "exports" field in node_modules, which points at un-built dist/ paths, breaking integration tests like oauth_api.in.spec.ts's POST /authorized-clients (response schema validation path was never reached — the underlying fxa-shared sub-path import failed at module load). This commit: - Adds back the fxa-shared subpath mapping alongside the tsconfig path mappings so both schemes coexist during jest runs.
1 parent 8874675 commit e0b63a2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/fxa-auth-server/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
...pathsToModuleNameMapper(compilerOptions.paths, {
2727
prefix: '<rootDir>/../../',
2828
}),
29+
'^fxa-shared/(.*)$': '<rootDir>/../fxa-shared/$1',
2930
},
3031
testTimeout: 10000,
3132
maxWorkers: 4,

0 commit comments

Comments
 (0)