[🐛 Bug]: ts-node performs type check regardless of configuration #13017
Labels
Bug 🐛
help wanted
Issues that are free to take by anyone interested
Needs Investigation
Issues that require more information on the problem.
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
latest
Node.js Version
18.19.1
Mode
Standalone Mode
Which capabilities are you using?
What happened?
ts-node
performs type checking regardless of the options (autoCompile: true,
ortypeCheck: false,
) specified in the wdio config. Alternatively, I tried specifying thets-node
options in the tsconfig, but the result is the same, which makes me think it's either a ts-node issue or wdio overrides any options passed to ts-node with default values.Unfortunately, I can't test on node.js v20+ right now.
ATTENTION: The attached reproducible example relates to the abovementioned issue.
However, it looks like the issue is older than I might initially think. So, I went back to some of my older codebases and found this setup:
In the version above, it works (or actually doesn't work) in the reverse manner. The
ts-node
never throws when there are type-related errors in your code. However, unlike the fresh issue aboe, you can achieve a TS error by specifying the ts-node options in the tsconfig.The will look like this:
I assume someone was fixing this
Error: undefined
and broke the last ts-node options part that was "working"What is your expected behavior?
Tests should run regardless of any type-related errors in the code when
autoCompile: true,
ortypeCheck: false,
How to reproduce the bug.
npm init wdio@latest .
let foo: string; foo = 42
npm run wdio
bug-tsnode-opts.zip
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: