Closed timvahlbrock closed 9 months ago
Thanks for raising @timvahlbrock.
I've got a PR up to remove verror
since we can now use platform-native stuff to achieve the same thing. This would make it tolerant of errors that aren't Error
instances, so should solve that problem for you.
For the point about loaders, I've raised https://github.com/cucumber/cucumber-js/issues/2364. Both --loader
and register()
are still experimental, we may let this shake out a bit before committing to putting something in our own API, just to manage expectations.
👓 What did you see?
The documented way of registering ts-node in esm context by setting the nom script to
cross-env NODE_OPTIONS='--loader ts-node/esm' cucumber-js
creates the following warning.I simplified that to adding this to my cucumber.mjs:
This works, but typescript errors are swallowed (by VError in cucumber), because they are not actual error instances:
✅ What did you expect to see?
No warnings, TS Error is printed.
📦 Which tool/library version are you using?
@cucumber/cucumber: 10.0.1 ts-node: 10.9.2 Node: 20
🔬 How could we reproduce it?
Clone https://github.com/timvahlbrock/cucumber-tsnode, install dependencies, run scripts test and test-old. The earlier shows the V-Error problem, the later the Node Warning.
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.