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

jest-playwright.config.js in project root not working #61

Closed
thernstig opened this issue Mar 5, 2020 · 3 comments
Closed

jest-playwright.config.js in project root not working #61

thernstig opened this issue Mar 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@thernstig
Copy link
Contributor

The documentation states:

You can specify a jest-playwright.config.js at the root of the project

This is not true, as with the below configuration, where one use Jest projects, it does not find jest-playwright.config.js by default if it is placed in the project's root dir:

module.exports = {
  verbose: true,
  projects: [
    {
      displayName: 'UNIT:SERVER',
      testEnvironment: 'node',
      rootDir: 'server/',
    },
    {
      displayName: 'E2E',
      preset: 'jest-playwright-preset',
      rootDir: 'tests/',
      setupFilesAfterEnv: [
        '<rootDir>/jest.setup.js',
      ],
    },
  ],
};

This forces me to use JEST_PLAYWRIGHT_CONFIG, but it would be nice if this plugin actually looked at the Jest project root when finding the file.

@mmarkelov mmarkelov added the enhancement New feature or request label Mar 5, 2020
@mmarkelov
Copy link
Member

@thernstig started work on this issue. It must be ok, if you don't use jest-playwright command to run your tests. I'm working on full support for all possible cases

@thernstig
Copy link
Contributor Author

@mmarkelov I verified that this now works fine without setting JEST_PLAYWRIGHT_CONFIG when running with jest CLI - good job.

@mmarkelov
Copy link
Member

Should be totally fixed in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants