Skip to content
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

Params type for beforeAllSubcases is improperly specialized #3965

Open
kainino0x opened this issue Sep 24, 2024 · 0 comments
Open

Params type for beforeAllSubcases is improperly specialized #3965

kainino0x opened this issue Sep 24, 2024 · 0 comments

Comments

@kainino0x
Copy link
Collaborator

Issue found by @shrekshao. This is a TypeScript type safety thing, not a serious problem, but would be nice to fix because it makes test development harder.

The t.params value in beforeAllSubcases(t => { ... }) has type TestParams & DeepReadonlyObject<...>. The TestParams & shouldn't be there, because it allows t.params.someFieldThatDoesntExist (which has type JSONWithUndefined) which should be a type error (Property 'someFieldThatDoesntExist' does not exist).

It works correctly in the test function .fn(t => { ... }) so there is some difference in how they're set up.

@kainino0x kainino0x added this to CTS Sep 24, 2024
@kainino0x kainino0x moved this to Open (no TODO) in CTS Sep 24, 2024
@kainino0x kainino0x removed this from CTS Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant