Skip to content

Commit

Permalink
Use legacy fake timers
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <[email protected]>
  • Loading branch information
awharn committed Oct 17, 2023
1 parent 219c660 commit 52eabe7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ typings/
/config/
**/docs/typedoc/
__tests__/__results__/
packages/zosunix/__tests__/__results__/
packages/**/__tests__/__results__/
/__tests__/tmpproj/
/__tests__/src/locales
/.nyc_output
Expand Down
4 changes: 2 additions & 2 deletions packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ describe("CoreUtils", () => {
it("should sleep the default amount", async () => {
const defaultSleepTime = 1000;

jest.useFakeTimers();
jest.useFakeTimers({legacyFakeTimers: true});
jest.spyOn(global, "setTimeout");

const waitForSleep = CoreUtils.sleep();
Expand All @@ -324,7 +324,7 @@ describe("CoreUtils", () => {
it("should sleep for the specified amount", async () => {
const specifiedTime = 5000;

jest.useFakeTimers();
jest.useFakeTimers({legacyFakeTimers: true});
jest.spyOn(global, "setTimeout");

const waitForSleep = CoreUtils.sleep(specifiedTime);
Expand Down

0 comments on commit 52eabe7

Please sign in to comment.