|
10 | 10 | import {expectError, expectType} from 'mlh-tsd';
|
11 | 11 | //eslint-disable-next-line import/no-extraneous-dependencies
|
12 | 12 | import {jest} from '@jest/globals';
|
13 |
| -import JestMock = require('jest-mock'); |
| 13 | +import type {Mock} from 'jest-mock'; |
14 | 14 |
|
15 | 15 | expectType<void>(jest.addMatchers({}));
|
16 | 16 | expectType<typeof jest>(jest.autoMockOff());
|
@@ -38,22 +38,22 @@ expectType<typeof jest>(jest.resetModuleRegistry());
|
38 | 38 | expectType<typeof jest>(jest.resetModules());
|
39 | 39 | expectType<typeof jest>(jest.isolateModules(() => {}));
|
40 | 40 | expectType<typeof jest>(jest.retryTimes(3));
|
41 |
| -expectType<JestMock.Mock<Promise<string>, []>>( |
| 41 | +expectType<Mock<Promise<string>, []>>( |
42 | 42 | jest
|
43 | 43 | .fn(() => Promise.resolve('string value'))
|
44 | 44 | .mockResolvedValueOnce('A string, not a Promise'),
|
45 | 45 | );
|
46 |
| -expectType<JestMock.Mock<Promise<string>, []>>( |
| 46 | +expectType<Mock<Promise<string>, []>>( |
47 | 47 | jest
|
48 | 48 | .fn(() => Promise.resolve('string value'))
|
49 | 49 | .mockResolvedValue('A string, not a Promise'),
|
50 | 50 | );
|
51 |
| -expectType<JestMock.Mock<Promise<string>, []>>( |
| 51 | +expectType<Mock<Promise<string>, []>>( |
52 | 52 | jest
|
53 | 53 | .fn(() => Promise.resolve('string value'))
|
54 | 54 | .mockRejectedValueOnce(new Error('An error, not a string')),
|
55 | 55 | );
|
56 |
| -expectType<JestMock.Mock<Promise<string>, []>>( |
| 56 | +expectType<Mock<Promise<string>, []>>( |
57 | 57 | jest
|
58 | 58 | .fn(() => Promise.resolve('string value'))
|
59 | 59 | .mockRejectedValue(new Error('An error, not a string')),
|
|
0 commit comments