chore: Update (ts-)jest and use modern fake timers where possible

* chore(deps): update dependency jest to v27

* chore: Update (ts-)jest and use modern fake timers where possible

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
This commit is contained in:
renovate[bot]
2021-05-31 15:29:14 +02:00
committed by GitHub
parent 9172f2ae59
commit afc662ca9a
8 changed files with 1549 additions and 2425 deletions

View File

@@ -3,6 +3,9 @@ import { InteractionCompleter } from '../../../../../src/identity/interaction/ut
import type { HttpRequest } from '../../../../../src/server/HttpRequest';
import type { HttpResponse } from '../../../../../src/server/HttpResponse';
// Use fixed dates
jest.useFakeTimers();
describe('An InteractionCompleter', (): void => {
const request: HttpRequest = {} as any;
const response: HttpResponse = {} as any;
@@ -11,8 +14,6 @@ describe('An InteractionCompleter', (): void => {
const completer = new InteractionCompleter();
beforeEach(async(): Promise<void> => {
const now = Date.now();
Date.now = jest.fn().mockReturnValue(now);
provider = {
interactionFinished: jest.fn(),
} as any;