-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type error in test runner #44
Comments
can you describe how you get this error, and the raw output? |
I simply wrote a test and tried to test it. Then the test runner froze and after a few sec that messages pops up. I got confused because '30 if (!(t = _.trys, t = t.length > 0' has nothing to do with Kataw source code or the test runner. I modified the tests, and it works now except I need to update all the time. Normal testing are broken - always complaining about mismatch. Anyway. This is common TS issue. I guess related to something in ts-node library |
I was wrong. It points to some code in ts-lib. Not ts-node. Closest I got in tracking it is this issue egoist/bili#280 |
@aladdin-add It's related to async/await |
I tried to run coverage test/cli.ts:30:111 - error TS2322: Type 'number' is not assignable to type '{ label: number; sent: () => any; trys: any[]; ops: any[]; }'. 30 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
the code was compiled twice? TypeStrong/ts-node#774 (comment) but why? I was not able to repro on my macos, can you share the command that you used to run? |
I only tried to run code coverage. 'npm run coverage' |
not sure why. maybe another "windows-compat" issue. ╮( ̄▽ ̄)╭ a workaround could be setting "target" to >="es2017", to avoid compiling async functions to regenerator. |
@aladdin-add is there a fix for this? And what's the test runner update? |
test/cli.ts:30:111 - error TS2322: Type 'number' is not assignable to type '{ label: number; sent: () => any; trys: any[]; ops: any[]; }'.
30 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
The text was updated successfully, but these errors were encountered: