cucumber-playwright icon indicating copy to clipboard operation
cucumber-playwright copied to clipboard

The stack trace is messed up due to ts-node and playwright overlapping in playing with the sourcemap

Open Konubinix opened this issue 2 years ago • 1 comments

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 image

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,

Konubinix avatar Aug 09 '23 16:08 Konubinix

For your information, a pull request is ongoing to fix that issue.

Also, I added a workaround in case you cannot upgrade playwright.

Konubinix avatar Aug 17 '23 13:08 Konubinix