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

fix: support path based auto completion for unstable_mockModule method #988

Merged
merged 2 commits into from
Jan 15, 2023
Merged

fix: support path based auto completion for unstable_mockModule method #988

merged 2 commits into from
Jan 15, 2023

Conversation

mrazauskas
Copy link
Contributor

From #977 (comment)

Currently path based auto completion is supported for jest.mock, but not for jest.unstable_mockModule method.

The jest.mock works only with CJS modules. The jest.unstable_mockModule method was introduced to supporting mocking of ESM modules. If I get it right, it is marked unstable, because it is not yet feature complete and can change outside of major releases. Otherwise this is official and the only way to mock ESM modules.

At some point it will become jest.mockModule. This means I will send another PR to remove unstable_ from the regex.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3910327078

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.778%

Totals Coverage Status
Change from base Build 3888958407: 0.0%
Covered Lines: 3373
Relevant Lines: 3396

💛 - Coveralls

Copy link
Collaborator

@connectdotz connectdotz left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@connectdotz connectdotz merged commit 2277b48 into jest-community:master Jan 15, 2023
@mrazauskas mrazauskas deleted the fix-mockModule-auto-completion branch January 15, 2023 17:16
legend1202 pushed a commit to legend1202/vscode-jest that referenced this pull request Jun 18, 2023
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

Successfully merging this pull request may close these issues.

3 participants