Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/fxa-auth-server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: '.',
testMatch: ['<rootDir>/lib/**/*.spec.ts', '<rootDir>/config/**/*.spec.ts'],
testMatch: ['<rootDir>/lib/**/*.spec.ts', '<rootDir>/config/**/*.spec.ts', '<rootDir>/scripts/**/*.spec.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
transform: {
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: { isolatedModules: true } }],
},
transformIgnorePatterns: ['/node_modules/(?!(@fxa|fxa-shared)/)'],
transformIgnorePatterns: ['/node_modules/(?!(@fxa|fxa-shared|p-queue|p-timeout|eventemitter3)/)'],
moduleNameMapper: {
'^@fxa/shared/(.*)$': '<rootDir>/../../libs/shared/$1/src',
'^@fxa/accounts/(.*)$': '<rootDir>/../../libs/accounts/$1/src',
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"test": "VERIFIER_VERSION=0 scripts/test-local.sh",
"test-jest": "jest --no-coverage --forceExit",
"test-jest-unit": "jest --no-coverage --forceExit",
"test-jest-integration": "jest --no-coverage --forceExit --config jest.integration.config.js",
"test-jest-integration": "jest --no-coverage --forceExit --config jest.integration.config.js --testPathPattern='\\.in\\.spec\\.ts$'",
"test-jest-ci": "JEST_JUNIT_OUTPUT_DIR='../../artifacts/tests/fxa-auth-server' JEST_JUNIT_OUTPUT_NAME='jest-results.xml' jest --coverage --forceExit --ci --reporters=default --reporters=jest-junit",
Comment on lines 38 to 42
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script adds a Jest-only --testPathPattern filter, but the repo's default yarn test flow (scripts/test-local.sh) still runs Mocha test/scripts tests. Given the PR goal of migrating script tests off Mocha, consider updating the test runner scripts (or removing the old Mocha script tests) so the Jest migration is complete and script tests aren't duplicated/confusing.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, gonna remove mocha soon

"test-unit": "VERIFIER_VERSION=0 TEST_TYPE=unit scripts/test-ci.sh",
"test-integration": "VERIFIER_VERSION=0 TEST_TYPE=integration scripts/test-ci.sh",
Expand Down
Loading
Loading