-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
Describe the bug
I am trying to use jest-playwright with Jest 27 and get this error:
TypeError: virtualMocks.get is not a function
at Resolver._getVirtualMockPath (../../node_modules/jest-resolve/build/index.js:447:25)
To Reproduce
I am using a standard installation and a single simple test that just opens a browser.
Desktop (please complete the following information):
- OS: [macOS M1]
- Playwright version [1.10.0]
- jest-playwright version [1.5.1]
- jest version [27.0.0-next.7]
Jest configuration (Either in the package.json > jest or in the jest.config.js
):
module.exports = {
globals: {
"ts-jest": {
diagnostics: false,
isolatedModules: true,
},
},
moduleDirectories: ["<rootDir>/../../node_modules"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"\\.css$": "identity-obj-proxy",
"\\.scss$": "identity-obj-proxy",
"^@cling/(.*)$": "<rootDir>/../$1",
},
reporters: ["default"],
setupFilesAfterEnv: ["<rootDir>/../lib.shared.test/jest_setup.ts"],
snapshotSerializers: [],
preset: "jest-playwright-preset",
testMatch: ["<rootDir>/__tests__/**/*.spec.ts?(x)"],
transform: {"^.+\\.tsx?$": "ts-jest"},
}
This is a sub-project in a monorepo. But even if I use jest-playwright-preset
in the main configuration it won't work.
Additional context
All's working fine with Jest 26.6.3
amalitsky and LingVuDevTh3S4mur41
Metadata
Metadata
Assignees
Labels
No labels