Skip to content

Commit

Permalink
feat: remove Date from setSystemTime types while not yet officially s…
Browse files Browse the repository at this point in the history
…upported
  • Loading branch information
liamfd committed Jun 16, 2020
1 parent 72fda94 commit 725c00d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion types/jest/index.d.ts
Expand Up @@ -141,7 +141,7 @@ declare namespace jest {
* > Note: This function is only available when using modern fake timers
* > implementation
*/
function setSystemTime(now?: number | Date): void;
function setSystemTime(now?: number): void;
/**
* When mocking time, Date.now() will also be mocked. If you for some
* reason need access to the real current time, you can invoke this
Expand Down
1 change: 0 additions & 1 deletion types/jest/jest-tests.ts
Expand Up @@ -294,7 +294,6 @@ jest.useFakeTimers('foo');
// https://jestjs.io/docs/en/jest-object#jestsetsystemtimenow-number--date
jest.setSystemTime();
jest.setSystemTime(0);
jest.setSystemTime(new Date(0));
// $ExpectError
jest.setSystemTime('foo');

Expand Down

0 comments on commit 725c00d

Please sign in to comment.