Skip to content

Commit 7c07118

Browse files
committed
fix(frontend): exclude playwright/ from Jest test discovery
CI's Test Frontend job has been red since the first Playwright spec landed. Jest's default testMatch picks up '**/*.spec.ts' which includes playwright/specs/**/*.spec.ts; those import @playwright/test, which can't load in the jsdom env Jest runs in: TypeError: Class extends value undefined is not a constructor or null at node_modules/playwright-core/lib/utilsBundle.js:83612:15 Local jest runs happened to pick a smaller --testPathPattern so the breakage went unnoticed until the recent commits made both spec files visible to the CI scan at once. Add '<rootDir>/playwright/' alongside the existing cypress/ entry in testPathIgnorePatterns. Confirmed locally: jest --listTests returns zero playwright matches; full suite 222/222 green.
1 parent 8691271 commit 7c07118

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

frontend/jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module.exports = {
22
preset: 'jest-preset-angular',
33
// testMatch: ['**/*.jest.ts'],
4-
testPathIgnorePatterns: ['<rootDir>/cypress/'],
4+
// playwright/ is excluded so Jest doesn't try to run our browser specs
5+
// (they import @playwright/test which can't load in the jsdom env and
6+
// explodes with "Class extends value undefined" out of playwright-core).
7+
testPathIgnorePatterns: ['<rootDir>/cypress/', '<rootDir>/playwright/'],
58
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
69
maxWorkers: 1,
710
// Path aliases from tsconfig.app.json -- Jest doesn't read them automatically.

0 commit comments

Comments
 (0)