Skip to content

Commit 9ae7ef1

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 0d9a2f1 commit 9ae7ef1

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
@@ -25,6 +25,7 @@ module.exports = {
2525
...pathsToModuleNameMapper(compilerOptions.paths, {
2626
prefix: '<rootDir>/../../',
2727
}),
28+
'^fxa-shared/(.*)$': '<rootDir>/../fxa-shared/$1',
2829
},
2930
testTimeout: 10000,
3031
maxWorkers: 4,

0 commit comments

Comments
 (0)