From 2bf8c8bcd61181984dc5d2bb6b8fc7b64a3f11d7 Mon Sep 17 00:00:00 2001 From: Florian Schoellhammer Date: Fri, 12 Jul 2019 11:10:43 -0700 Subject: [PATCH] Unit Test 12 - Fix Storage Mock Summary: **Final Goal** Currently unit test by default unmock everything and dependencies have to be explicitely mocked. The goal is to mock everything by default and whitelist (unmock) explicitely. **This Diff** Fixes the typing in the mock and add unit tests Differential Revision: D16198318 fbshipit-source-id: d2bb71e9c940f4aeb48f8ac92bf3c5444ebc2025 --- flow/jest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/jest.js b/flow/jest.js index 252c05bea44..b149195e076 100644 --- a/flow/jest.js +++ b/flow/jest.js @@ -1123,7 +1123,7 @@ declare var expect: { hasAssertions(): void, any(value: mixed): JestAsymmetricEqualityType, anything(): any, - arrayContaining(value: Array): Array, + arrayContaining(value: $ReadOnlyArray): Array, objectContaining(value: Object): Object, /** Matches any received string that contains the exact expected string. */ stringContaining(value: string): string, @@ -1162,7 +1162,7 @@ declare var jasmine: { DEFAULT_TIMEOUT_INTERVAL: number, any(value: mixed): JestAsymmetricEqualityType, anything(): any, - arrayContaining(value: Array): Array, + arrayContaining(value: $ReadOnlyArray): Array, clock(): JestClockType, createSpy(name: string): JestSpyType, createSpyObj(