Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global.ts config can't be specified from testEnvironmentOptions, as described in docs #624

Open
Rendez opened this issue Mar 9, 2021 · 3 comments
Labels
jest Issue related to Jest

Comments

@Rendez
Copy link

Rendez commented Mar 9, 2021

I haven't tried this repo yet, but I was scanning thru the code.

As of now, only config.serverOptions is used inside global.ts, but the config is read from a jest-playwright config (either default file path or specified via ENV variable). In the docs says you can alternatively specify testEnvironmentOptions['jest-playwright'], which I think it's a great idea (one that jest-puppeteer lacks). This however isn't correct for the case I just mentioned.

Is my assumption correct? https://github.com/playwright-community/jest-playwright/blob/master/src/global.ts#L38

@Rendez
Copy link
Author

Rendez commented Mar 9, 2021

One solution could be what is proposed here: jestjs/jest#9930

@mmarkelov
Copy link
Member

@Rendez yes& This is true. We have TODO here that there is problem in this case.

// TODO It won't work if config doesn't exist in root directory or in jest.config.js file

This is something that related to Jest and i agree that we should put in Readme

@Rendez
Copy link
Author

Rendez commented Mar 9, 2021

Feel free to close this issue when ready, and let's hope future versions of jest globals ship that fix some time.

@mmarkelov mmarkelov added the jest Issue related to Jest label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jest Issue related to Jest
Projects
None yet
Development

No branches or pull requests

2 participants