Skip to content

Conversation

@mrazauskas
Copy link
Contributor

@mrazauskas mrazauskas commented Jul 13, 2022

Fixes #13012
Adapted from https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60971/files

Summary

As it is explained in the linked issue (and also #12966), currently spyOn types do not handle index signatures. Thanks to @Maxim-Mazurok, a fix landed in @types/jest. Here I adapted it for Jest types to make it work through import {jest} from '@jest/globals'.

@Maxim-Mazurok could you take a look, please? (;

Test plan

Type tests are added. They are failing on main, but should pass on this branch.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@SimenB SimenB merged commit f87e4c3 into jestjs:main Jul 13, 2022
@Maxim-Mazurok
Copy link
Contributor

Thank you!

@SimenB
Copy link
Member

SimenB commented Jul 13, 2022

https://github.com/facebook/jest/releases/tag/v28.1.3

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: @jest/globals doesn't use spyOn() from @types/jest

4 participants