Skip to content

Commit

Permalink
Merge 1b0cf2a into 1ca2d51
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed Jan 13, 2023
2 parents 1ca2d51 + 1b0cf2a commit fd1cf84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/language-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as vscode from 'vscode';
import * as path from 'path';

const JestMockModuleApi =
/jest\.(mock|unmock|domock|dontmock|setmock|requireActual|requireMock|createMockFromModule|)\(['"](.*)/gi;
/jest\.(mock|unmock|domock|dontmock|setmock|requireActual|requireMock|createMockFromModule|unstable_mockModule)\(['"](.*)/gi;
const ImportFileRegex = /^([^\\.].*)\.(json|jsx|tsx|mjs|cjs|js|ts)$/gi;

const toCompletionItem = (
Expand Down
1 change: 1 addition & 0 deletions tests/language-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('LocalFileCompletionItemProvider', () => {
${'jest.requireActual'} | ${true}
${'jest.requireMock'} | ${true}
${'jest.createMockFromModule'} | ${true}
${'jest.unstable_mockModule'} | ${true}
${'jest.spyOn'} | ${false}
${'jest.fn'} | ${false}
`('for $jestMethod', async ({ jestMethod, isValid }) => {
Expand Down

0 comments on commit fd1cf84

Please sign in to comment.