chore: update flow-typed libdefs (#932)

Summary:
Generated with `flow-typed install --skip --overwrite`.

Test Plan:
`yarn flow` passes.

wchargin-branch: flow-typed-update
This commit is contained in:
William Chargin 2018-10-22 10:05:11 -07:00 committed by GitHub
parent 2687bc5115
commit 24242eccfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 30 deletions

View File

@ -1,5 +1,5 @@
// flow-typed signature: 7be2af8800fdadaea6ac0404d256bafc
// flow-typed version: 6ce6a0467c/enzyme_v3.x.x/flow_>=v0.53.x
// flow-typed signature: e50486ad88c5bbfcdfde9fef4fc4c5d1
// flow-typed version: ab187b275b/enzyme_v3.x.x/flow_>=v0.53.x
import * as React from "react";
@ -53,6 +53,7 @@ declare module "enzyme" {
prop(key: string): any,
key(): string,
simulate(event: string, ...args: Array<any>): this,
slice(begin?: number, end?: number): this,
setState(state: {}, callback?: Function): this,
setProps(props: {}): this,
setContext(context: Object): this,

View File

@ -1,5 +1,5 @@
// flow-typed signature: f9a2c9a8964707fcb0c42a8e48c82e8d
// flow-typed version: b2855bf71a/jest_v23.x.x/flow_>=v0.39.x
// flow-typed signature: 78c200acffbcc16bba9478f5396c3a00
// flow-typed version: b2980740dd/jest_v23.x.x/flow_>=v0.39.x
type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
(...args: TArguments): TReturn,
@ -199,16 +199,28 @@ type EnzymeMatchersType = {
toIncludeText(text: string): void,
toMatchElement(
element: React$Element<any>,
options?: {| ignoreProps?: boolean |},
options?: {| ignoreProps?: boolean, verbose?: boolean |},
): void,
toMatchSelector(selector: string): void
toMatchSelector(selector: string): void,
// 7.x
toHaveDisplayName(name: string): void,
};
// DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers
type DomTestingLibraryType = {
toBeDisabled(): void,
toBeEmpty(): void,
toBeInTheDocument(): void,
toBeVisible(): void,
toContainElement(element: HTMLElement | null): void,
toContainHTML(htmlText: string): void,
toHaveAttribute(name: string, expectedValue?: string): void,
toHaveClass(...classNames: string[]): void,
toHaveFocus(): void,
toHaveFormValues(expectedValues: { [name: string]: any }): void,
toHaveStyle(css: string): void,
toHaveTextContent(content: string | RegExp, options?: { normalizeWhitespace: boolean }): void,
toBeInTheDOM(): void,
toHaveTextContent(content: string): void,
toHaveAttribute(name: string, expectedValue?: string): void
};
// Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers
@ -704,14 +716,14 @@ interface JestExpectType {
/**
* This ensures that an Object matches the most recent snapshot.
*/
toMatchSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, name?: string): void,
toMatchSnapshot(propertyMatchers?: any, name?: string): void,
/**
* This ensures that an Object matches the most recent snapshot.
*/
toMatchSnapshot(name: string): void,
toMatchInlineSnapshot(snapshot?: string): void,
toMatchInlineSnapshot(propertyMatchers?: {[key: string]: JestAsymmetricEqualityType}, snapshot?: string): void,
toMatchInlineSnapshot(propertyMatchers?: any, snapshot?: string): void,
/**
* Use .toThrow to test that a function throws when it is called.
* If you want to test that a specific error gets thrown, you can provide an
@ -937,10 +949,11 @@ declare var describe: {
* @param {table} table of Test
*/
each(
table: Array<Array<mixed> | mixed>
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
};
@ -958,17 +971,7 @@ declare var it: {
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void,
/**
* each runs this test against array of argument arrays per each run
*
* @param {table} table of Test
*/
each(
table: Array<Array<mixed> | mixed>
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
) => void,
/**
* Only run this test
*
@ -982,12 +985,14 @@ declare var it: {
timeout?: number
): {
each(
table: Array<Array<mixed> | mixed>
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
},
/**
* Skip running this test
*
@ -1000,6 +1005,7 @@ declare var it: {
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void,
/**
* Run the test concurrently
*
@ -1012,18 +1018,21 @@ declare var it: {
fn?: (done: () => void) => ?Promise<mixed>,
timeout?: number
): void,
/**
* each runs this test against array of argument arrays per each run
*
* @param {table} table of Test
*/
each(
table: Array<Array<mixed> | mixed>
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
};
declare function fit(
name: JestTestName,
fn: (done: () => void) => ?Promise<mixed>,

View File

@ -1,6 +1,6 @@
// flow-typed signature: 6b26bd45f602f11945a41846caafb9a1
// flow-typed version: da30fe6876/object-assign_v4.x.x/flow_>=v0.25.x
// flow-typed signature: 0163683fe464be718f5e440cbb72d8b0
// flow-typed version: 62c71f6105/object-assign_v4.x.x/flow_>=v0.25.x
declare module "object-assign" {
declare module.exports: (target: any, ...sources: Array<any>) => Object;
declare module.exports: Object$Assign;
}