From 0974da86386cda6e4ee930334fd6fb6f6334afdd Mon Sep 17 00:00:00 2001 From: corrado4eyes Date: Tue, 3 Dec 2019 18:55:30 +0100 Subject: [PATCH] [#9] Added testUtils --- hearthstone/__tests__/testUtils/promiseUtils.ts | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 hearthstone/__tests__/testUtils/promiseUtils.ts diff --git a/hearthstone/__tests__/testUtils/promiseUtils.ts b/hearthstone/__tests__/testUtils/promiseUtils.ts new file mode 100644 index 00000000..aea550bd --- /dev/null +++ b/hearthstone/__tests__/testUtils/promiseUtils.ts @@ -0,0 +1,2 @@ +export const spyResolves = (returnValue: any) => jest.fn(() => Promise.resolve(returnValue)); +export const spyRejects = (error?: any) => jest.fn(() => Promise.reject(error)); \ No newline at end of file