Skip to content

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

@Rendez

Description

@Rendez

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

Activity

Rendez

Rendez commented on Mar 9, 2021

@Rendez
Author

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

mmarkelov

mmarkelov commented on Mar 9, 2021

@mmarkelov
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

Rendez commented on Mar 9, 2021

@Rendez
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jestIssue related to Jest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Rendez@mmarkelov

        Issue actions

          global.ts config can't be specified from testEnvironmentOptions, as described in docs · Issue #624 · playwright-community/jest-playwright