mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix jest's test.table flow type
Summary: The current flow type disallows passing in an `Array<string>` since the current type signature would allow just to append to the `Array`, `$ReadOnlyArray` doesn't allow writing. @public Reviewed By: jstejada Differential Revision: D16354977 fbshipit-source-id: a83c1227c1a15225487ac8672818d8b319dce32f
This commit is contained in:
committed by
Facebook Github Bot
parent
5029195d22
commit
c13e5d0b43
+4
-6
@@ -953,7 +953,7 @@ declare var describe: {
|
||||
* @param {table} table of Test
|
||||
*/
|
||||
each(
|
||||
table: Array<Array<mixed> | mixed>,
|
||||
table: $ReadOnlyArray<mixed | $ReadOnlyArray<mixed>>,
|
||||
): (
|
||||
name: JestTestName,
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
@@ -980,7 +980,7 @@ declare var it: {
|
||||
* @param {table} table of Test
|
||||
*/
|
||||
each(
|
||||
table: Array<Array<mixed> | mixed>,
|
||||
table: $ReadOnlyArray<mixed | $ReadOnlyArray<mixed>>,
|
||||
): (
|
||||
name: JestTestName,
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
@@ -998,7 +998,7 @@ declare var it: {
|
||||
timeout?: number,
|
||||
): {
|
||||
each(
|
||||
table: Array<Array<mixed> | mixed>,
|
||||
table: $ReadOnlyArray<mixed | $ReadOnlyArray<mixed>>,
|
||||
): (
|
||||
name: JestTestName,
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
@@ -1034,7 +1034,7 @@ declare var it: {
|
||||
* @param {table} table of Test
|
||||
*/
|
||||
each(
|
||||
table: Array<Array<mixed> | mixed>,
|
||||
table: $ReadOnlyArray<mixed | $ReadOnlyArray<mixed>>,
|
||||
): (
|
||||
name: JestTestName,
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
@@ -1065,9 +1065,7 @@ type JestPrettyFormatColors = {
|
||||
};
|
||||
|
||||
type JestPrettyFormatIndent = string => string;
|
||||
type JestPrettyFormatRefs = Array<any>;
|
||||
type JestPrettyFormatPrint = any => string;
|
||||
type JestPrettyFormatStringOrNull = string | null;
|
||||
|
||||
type JestPrettyFormatOptions = {|
|
||||
callToJSON: boolean,
|
||||
|
||||
Reference in New Issue
Block a user