Skip to content

Commit 4460652

Browse files
chrisbobbegnprice
authored andcommitted
jest libdef: Re-sync with upstream, before updating to 27
Done by pulling the 26 libdef afresh and reapplying our patches to it.
1 parent 6a76384 commit 4460652

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

flow-typed/jest_v26.x.x.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ type DomTestingLibraryType = {
259259
// 5.x
260260
toHaveDisplayValue(value: string | string[]): void,
261261
toBeChecked(): void,
262+
toBeEmptyDOMElement(): void,
263+
toBePartiallyChecked(): void,
264+
toHaveDescription(text: string | RegExp): void,
262265
...
263266
};
264267

@@ -847,11 +850,15 @@ type JestObjectType = {
847850
* Determines if the given function is a mocked function.
848851
*/
849852
isMockFunction(fn: Function): boolean,
853+
/**
854+
* Alias of `createMockFromModule`.
855+
*/
856+
genMockFromModule(moduleName: string): any,
850857
/**
851858
* Given the name of a module, use the automatic mocking system to generate a
852859
* mocked version of the module for you.
853860
*/
854-
genMockFromModule(moduleName: string): any,
861+
createMockFromModule(moduleName: string): any,
855862
/**
856863
* Mocks a module with an auto-mocked version when it is being required.
857864
*
@@ -1057,11 +1064,20 @@ declare var it: {
10571064
* @param {Function} Test
10581065
* @param {number} Timeout for the test, in milliseconds.
10591066
*/
1060-
skip(
1061-
name: JestTestName,
1062-
fn?: (done: JestDoneFn) => ?Promise<mixed>,
1063-
timeout?: number
1064-
): void,
1067+
skip: {|
1068+
(
1069+
name: JestTestName,
1070+
fn?: (done: JestDoneFn) => ?Promise<mixed>,
1071+
timeout?: number
1072+
): void,
1073+
each(
1074+
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
1075+
): (
1076+
name: JestTestName,
1077+
fn?: (...args: Array<any>) => ?Promise<mixed>,
1078+
timeout?: number
1079+
) => void,
1080+
|},
10651081
/**
10661082
* Highlight planned tests in the summary output
10671083
*

0 commit comments

Comments
 (0)