From d82c1c221cf9d7572ddf4562bed791da1b4634b7 Mon Sep 17 00:00:00 2001 From: Ahn Date: Sun, 21 Jan 2018 00:29:38 +0100 Subject: [PATCH] Adjust flow type for accessType parameter in spyOn function (#5354) --- types/Jest.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/Jest.js b/types/Jest.js index 45a8f98af0c6..a21315db4bb2 100644 --- a/types/Jest.js +++ b/types/Jest.js @@ -43,7 +43,11 @@ export type Jest = {| runTimersToTime(msToRun: number): void, setMock(moduleName: string, moduleExports: any): Jest, setTimeout(timeout: number): Jest, - spyOn(object: Object, methodName: string, accessType?: string): JestMockFn, + spyOn( + object: Object, + methodName: string, + accessType?: 'get' | 'set', + ): JestMockFn, unmock(moduleName: string): Jest, useFakeTimers(): Jest, useRealTimers(): Jest,