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

getPlaywrightInstance is eating error messages #817

Open
ekeijl opened this issue Jul 26, 2024 · 0 comments
Open

getPlaywrightInstance is eating error messages #817

ekeijl opened this issue Jul 26, 2024 · 0 comments

Comments

@ekeijl
Copy link

ekeijl commented Jul 26, 2024

Describe the bug
I'm using this package through @storybook/test-runner. When running the test runner, I kept getting confusing error messages about Playwright not being installed. The error is thrown here, but it is catching errors too broadly and does not log the original error message.

The problem is that the original error message is never logged, so the user does not know what is failing.

To Reproduce
Hard to provide a reproduction scenario, because it was some dependency issue between packages in a mono-repo.

Expected behavior
Log the original message so it is not hidden from the user.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Playwright version 1.4.5
  • jest-playwright version 4.0.0

Jest configuration (Either in the package.json > jest or in the jest.config.js):

Additional context
What confused me the most was the fact that there are indeed problems when using this package with Yarn PnP, as explained here. This would cause the error to show, but it was not the issue I was having. This cost me hours of debugging to figure out that Playwright was indeed correctly installed but the error came from somewhere else.

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

No branches or pull requests

1 participant