You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If my main program is a "module" inside package.json, I have to rename the config file to jest-playwright.config.cjs to use module.exports (CommonJS export way). That way, the configuration gets ignored and the default is used.
I changed the code inside the compiled utils.js to use my CommonJS configuration:
Additional context
Maybe this isn't quite a bug, more like a feature request but can we add the cjs way to the configuration file importer parser thingy? So it either uses js or cjs?
Info
I was able to work around this by just passing JEST_PLAYWRIGHT_CONFIG=jest-playwright.config.cjs jest, now it works without changing the compiled jest-playwright-preset module.
The text was updated successfully, but these errors were encountered:
@fschoenfeldt thanks for report. For me this is not a bug. You should use JEST_PLAYWRIGHT_CONFIG for this purpose. Also I think that I can make some checks to use jest-playwright.config.cjs if there is module inside package.json
Describe the bug
If my main program is a
"module"
inside package.json, I have to rename the config file tojest-playwright.config.cjs
to usemodule.exports
(CommonJS export way). That way, the configuration gets ignored and the default is used.I changed the code inside the compiled
utils.js
to use my CommonJS configuration:Additional context
Maybe this isn't quite a bug, more like a feature request but can we add the cjs way to the configuration file importer parser thingy? So it either uses js or cjs?
Info
I was able to work around this by just passing
JEST_PLAYWRIGHT_CONFIG=jest-playwright.config.cjs jest
, now it works without changing the compiled jest-playwright-preset module.The text was updated successfully, but these errors were encountered: