From 53f9d70658fceae5f07f4f982f888f0b1b89e361 Mon Sep 17 00:00:00 2001 From: Abhishek Jakhar Date: Wed, 21 Oct 2020 15:43:02 +0530 Subject: [PATCH] useRealTimers in onCssReady test case --- .../src/reader/transformers/onCssReady.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/techdocs/src/reader/transformers/onCssReady.test.ts b/plugins/techdocs/src/reader/transformers/onCssReady.test.ts index c83a94f35d..67ae38c56b 100644 --- a/plugins/techdocs/src/reader/transformers/onCssReady.test.ts +++ b/plugins/techdocs/src/reader/transformers/onCssReady.test.ts @@ -25,14 +25,20 @@ import { onCssReady } from '../transformers'; const docStorageUrl: string = 'https://techdocs-mock-sites.storage.googleapis.com'; -jest.useFakeTimers(); - const fixture = ` `; describe('onCssReady', () => { + beforeAll(() => { + jest.useFakeTimers(); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + beforeEach(() => { mockStylesheetEventListener(100); });