Skip to content

Commit

Permalink
fixup! Use regular import in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Oct 6, 2020
1 parent a09bd56 commit 1e18729
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test-types/top-level-jest-namespace.test.ts
Expand Up @@ -10,7 +10,7 @@
import {expectError, expectType} from 'mlh-tsd';
//eslint-disable-next-line import/no-extraneous-dependencies
import {jest} from '@jest/globals';
import JestMock = require('jest-mock');
import type {Mock} from 'jest-mock';

expectType<void>(jest.addMatchers({}));
expectType<typeof jest>(jest.autoMockOff());
Expand Down Expand Up @@ -38,22 +38,22 @@ expectType<typeof jest>(jest.resetModuleRegistry());
expectType<typeof jest>(jest.resetModules());
expectType<typeof jest>(jest.isolateModules(() => {}));
expectType<typeof jest>(jest.retryTimes(3));
expectType<JestMock.Mock<Promise<string>, []>>(
expectType<Mock<Promise<string>, []>>(
jest
.fn(() => Promise.resolve('string value'))
.mockResolvedValueOnce('A string, not a Promise'),
);
expectType<JestMock.Mock<Promise<string>, []>>(
expectType<Mock<Promise<string>, []>>(
jest
.fn(() => Promise.resolve('string value'))
.mockResolvedValue('A string, not a Promise'),
);
expectType<JestMock.Mock<Promise<string>, []>>(
expectType<Mock<Promise<string>, []>>(
jest
.fn(() => Promise.resolve('string value'))
.mockRejectedValueOnce(new Error('An error, not a string')),
);
expectType<JestMock.Mock<Promise<string>, []>>(
expectType<Mock<Promise<string>, []>>(
jest
.fn(() => Promise.resolve('string value'))
.mockRejectedValue(new Error('An error, not a string')),
Expand Down

0 comments on commit 1e18729

Please sign in to comment.