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

Let jest-playwright.config.js export an async function #638

Closed
thernstig opened this issue Mar 18, 2021 · 1 comment · Fixed by #649
Closed

Let jest-playwright.config.js export an async function #638

thernstig opened this issue Mar 18, 2021 · 1 comment · Fixed by #649
Labels
enhancement New feature or request

Comments

@thernstig
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to use async/await in my jest-playwright.config.js as it is nicer and easier to read code that way.

Describe the solution you'd like
Similar to how Jest's globalSetup can except the export of an async function, so should the above config like:

module.exports = async () => {
  // Do some cool async stuff here
  if (foo) {
    await exec('foominator', {
      cwd: path.join(repoRoot, 'clientclient'),
    });
  }
};
@thernstig
Copy link
Contributor Author

@mmarkelov it would be good if the README was updated to state that this is supported?

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

Successfully merging a pull request may close this issue.

2 participants