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.
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):
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.