mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 17:33:15 +08:00
add getEnv to jest's type definition
Reviewed By: AGS- Differential Revision: D14858004 fbshipit-source-id: 38ef0283f5605f6a13d179d8c68dd26c63adb910
This commit is contained in:
committed by
Facebook Github Bot
parent
5e5439a921
commit
e293f8e01f
12
flow/jest.js
12
flow/jest.js
@@ -1143,6 +1143,17 @@ declare function spyOn(value: mixed, method: string): Object;
|
||||
/** Holds all functions related to manipulating test runner */
|
||||
declare var jest: JestObjectType;
|
||||
|
||||
/**
|
||||
* https://jasmine.github.io/2.4/custom_reporter.html
|
||||
*/
|
||||
type JasmineReporter = {
|
||||
jasmineStarted?: (suiteInfo: mixed) => void,
|
||||
suiteStarted?: (result: mixed) => void,
|
||||
specStarted?: (result: mixed) => void,
|
||||
specDone?: (result: mixed) => void,
|
||||
suiteDone?: (result: mixed) => void,
|
||||
};
|
||||
|
||||
/**
|
||||
* The global Jasmine object, this is generally not exposed as the public API,
|
||||
* using features inside here could break in later versions of Jest.
|
||||
@@ -1158,6 +1169,7 @@ declare var jasmine: {
|
||||
baseName: string,
|
||||
methodNames: Array<string>,
|
||||
): {[methodName: string]: JestSpyType},
|
||||
getEnv(): {addReporter: (jasmineReporter: JasmineReporter) => void},
|
||||
objectContaining(value: Object): Object,
|
||||
stringMatching(value: string): string,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user