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

[Bug]: Wrong typings for skip/each #15475

Open
verytactical opened this issue Jan 22, 2025 · 3 comments
Open

[Bug]: Wrong typings for skip/each #15475

verytactical opened this issue Jan 22, 2025 · 3 comments

Comments

@verytactical
Copy link

Version

29.7.0

Steps to reproduce

// TypeError: Cannot read properties of undefined (reading 'each')
test.skip.skip.each([1])('foo', async () => {});

Expected behavior

Either works the same way as test.skip.each or, at the very least, has correct types.

Actual behavior

TypeError: Cannot read properties of undefined (reading 'each')

Additional context

No response

Environment

System:
    OS: Linux 6.8 omitted
    CPU: omitted
  Binaries:
    Node: 22.11.0
    Yarn: 1.22.22
    npm: 10.9.0
@mrazauskas
Copy link
Contributor

From your example it seems like you using types from @types/jest. (Or test() is actually imported from @jest/gobals?)

@types/jest is not part of Jest repo. It is maintained at https://github.com/DefinitelyTyped/DefinitelyTyped.

@verytactical
Copy link
Author

@mrazauskas So is this expected behavior from jest or not?

@mrazauskas
Copy link
Contributor

mrazauskas commented Jan 23, 2025

test.skip.skip should throw at run time, because of double skip. If typings allow this, that is a bug in types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants