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:
Jan Kassens
2019-07-18 09:38:47 -07:00
committed by Facebook Github Bot
parent 5029195d22
commit c13e5d0b43
+4 -6
View File
@@ -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,