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]: jest.doMock type from @jest/globals lacks of optional options parameter #12289

Closed
StefanoMagrassi opened this issue Feb 2, 2022 · 2 comments · Fixed by #12292
Closed

Comments

@StefanoMagrassi
Copy link

Version

27.4.6

Steps to reproduce

  1. import jest from @jest/globals
  2. use jest.doMock('some/module', someFactory, {virtual: true})
  3. Typescript throws error Expected 1-2 arguments, but got 3.ts(2554)

Expected behavior

jest.doMock should have the same signature of the one from @types/jest

Actual behavior

@jest/gloabls types definitions seem to be different from @types/jest

Additional context

No response

Environment

System:
  OS: Linux 5.13 Ubuntu 20.04.3 LTS (Focal Fossa)
  CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
  Node: 16.13.2 - /usr/bin/node
  Yarn: 1.22.17 - ~/.local/bin/yarn
  npm: 8.3.2 - ~/.local/bin/npm
npmPackages:
  jest: 27.4.7 => 27.4.7
@SimenB
Copy link
Member

SimenB commented Feb 2, 2022

Wanna send a PR? 😀

@github-actions
Copy link

github-actions bot commented Mar 6, 2022

This issue 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 Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants