cucumber-playwright
cucumber-playwright copied to clipboard
The stack trace is messed up due to ts-node and playwright overlapping in playing with the sourcemap
Hi.
For your information, the fact ts-node and playwright both try to transpile typescript and play with the sourcemap, the stack trace is not reliable.
See for instance the fork I made here https://github.com/Konubinix/cucumber-playwright/tree/show-stack-trace-error
Run npm test
The error is show like this
It points to custom-world.ts at line 11, while the error is actually at line 30.
I already pointed out the issue in playwright (see https://github.com/microsoft/playwright/issues/26346). So far, I doubt there is an easy workaround.
Trying to find out how people mitigated the issue, I found out that peolpe apparently did not notice it. So I figured I should warn you.
Hopefully you will help contribute in using playwright in cucumber confortable.
My best,
For your information, a pull request is ongoing to fix that issue.
Also, I added a workaround in case you cannot upgrade playwright.