TestRunner.mock.module problem while importing playwright/test
#53691
Labels
wrong repo
Issues that should be opened in another repository.
playwright/test
#53691
Version
v22.3.0
Platform
Subsystem
No response
What steps will reproduce the bug?
"type":"module"
in package.jsonmodule.js
main.js
node --experimental-test-module-mocks --experimental-require-module --experimental-detect-module module.js
. Normally everything worked correctlynode --experimental-test-module-mocks --experimental-require-module --experimental-detect-module main.js
. Here you should see an error:What if I use
const { test } = await import("playwright/test")
insteadNow
module.js
is:I get a new error:
How often does it reproduce? Is there a required condition?
It is reproduced every single time, normally without a condition.
What is the expected behavior? Why is that the expected behavior?
The expected behaviour is that the import occurs correctly and playwright is imported
What do you see instead?
An error (with
import { test } from "playwright/test"
):With
const { test } = await import("playwright/test")
Additional information
No response
The text was updated successfully, but these errors were encountered: