mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
chore(deps): update dependency flow-bin to ^0.133.0 (#2509)
* chore(deps): update dependency flow-bin to ^0.133.0 [skip netlify] * Update .flowconfig, editor SDKs, and flow-typed * chore(deps): update dependency flow-bin to ^0.133.0 [skip netlify] Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: ylemkimon <mail@ylem.kim>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// flow-typed signature: 3e71a890e92658d48779f359ce8bf84b
|
||||
// flow-typed version: cd4a902eba/jest_v24.x.x/flow_>=v0.39.x
|
||||
// flow-typed signature: e60c7806ec0ddaf4588f438843ef37bd
|
||||
// flow-typed version: 7afca48d86/jest_v26.x.x/flow_>=v0.104.x
|
||||
|
||||
type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
|
||||
(...args: TArguments): TReturn,
|
||||
@@ -22,7 +22,12 @@ type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
|
||||
* An array that contains all the object results that have been
|
||||
* returned by this mock function call
|
||||
*/
|
||||
results: Array<{ isThrow: boolean, value: TReturn }>,
|
||||
results: Array<{
|
||||
isThrow: boolean,
|
||||
value: TReturn,
|
||||
...
|
||||
}>,
|
||||
...
|
||||
},
|
||||
/**
|
||||
* Resets all information stored in the mockFn.mock.calls and
|
||||
@@ -95,6 +100,7 @@ type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
|
||||
* Sugar for jest.fn().mockImplementationOnce(() => Promise.reject(value))
|
||||
*/
|
||||
mockRejectedValueOnce(value: TReturn): JestMockFn<TArguments, Promise<any>>,
|
||||
...
|
||||
};
|
||||
|
||||
type JestAsymmetricEqualityType = {
|
||||
@@ -102,6 +108,7 @@ type JestAsymmetricEqualityType = {
|
||||
* A custom Jasmine equality tester
|
||||
*/
|
||||
asymmetricMatch(value: mixed): boolean,
|
||||
...
|
||||
};
|
||||
|
||||
type JestCallsType = {
|
||||
@@ -112,6 +119,7 @@ type JestCallsType = {
|
||||
first(): mixed,
|
||||
mostRecent(): mixed,
|
||||
reset(): void,
|
||||
...
|
||||
};
|
||||
|
||||
type JestClockType = {
|
||||
@@ -119,11 +127,13 @@ type JestClockType = {
|
||||
mockDate(date: Date): void,
|
||||
tick(milliseconds?: number): void,
|
||||
uninstall(): void,
|
||||
...
|
||||
};
|
||||
|
||||
type JestMatcherResult = {
|
||||
message?: string | (() => string),
|
||||
pass: boolean,
|
||||
...
|
||||
};
|
||||
|
||||
type JestMatcher = (
|
||||
@@ -142,6 +152,7 @@ type JestPromiseType = {
|
||||
* matcher can be chained. If the promise is rejected the assertion fails.
|
||||
*/
|
||||
resolves: JestExpectType,
|
||||
...
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -164,6 +175,7 @@ type JestStyledComponentsMatcherOptions = {
|
||||
media?: string,
|
||||
modifier?: string,
|
||||
supports?: string,
|
||||
...
|
||||
};
|
||||
|
||||
type JestStyledComponentsMatchersType = {
|
||||
@@ -172,6 +184,7 @@ type JestStyledComponentsMatchersType = {
|
||||
value: JestStyledComponentsMatcherValue,
|
||||
options?: JestStyledComponentsMatcherOptions
|
||||
): void,
|
||||
...
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -193,12 +206,12 @@ type EnzymeMatchersType = {
|
||||
toHaveClassName(className: string): void,
|
||||
toHaveHTML(html: string): void,
|
||||
toHaveProp: ((propKey: string, propValue?: any) => void) &
|
||||
((props: {}) => void),
|
||||
((props: { ... }) => void),
|
||||
toHaveRef(refName: string): void,
|
||||
toHaveState: ((stateKey: string, stateValue?: any) => void) &
|
||||
((state: {}) => void),
|
||||
((state: { ... }) => void),
|
||||
toHaveStyle: ((styleKey: string, styleValue?: any) => void) &
|
||||
((style: {}) => void),
|
||||
((style: { ... }) => void),
|
||||
toHaveTagName(tagName: string): void,
|
||||
toHaveText(text: string): void,
|
||||
toHaveValue(value: any): void,
|
||||
@@ -210,6 +223,7 @@ type EnzymeMatchersType = {
|
||||
toMatchSelector(selector: string): void,
|
||||
// 7.x
|
||||
toHaveDisplayName(name: string): void,
|
||||
...
|
||||
};
|
||||
|
||||
// DOM testing library extensions (jest-dom)
|
||||
@@ -220,6 +234,7 @@ type DomTestingLibraryType = {
|
||||
*/
|
||||
toBeInTheDOM(container?: HTMLElement): void,
|
||||
|
||||
// 4.x
|
||||
toBeInTheDocument(): void,
|
||||
toBeVisible(): void,
|
||||
toBeEmpty(): void,
|
||||
@@ -233,13 +248,18 @@ type DomTestingLibraryType = {
|
||||
toHaveAttribute(attr: string, value?: any): void,
|
||||
toHaveClass(...classNames: string[]): void,
|
||||
toHaveFocus(): void,
|
||||
toHaveFormValues(expectedValues: { [name: string]: any }): void,
|
||||
toHaveStyle(css: string): void,
|
||||
toHaveFormValues(expectedValues: { [name: string]: any, ... }): void,
|
||||
toHaveStyle(css: string | { [name: string]: any, ... }): void,
|
||||
toHaveTextContent(
|
||||
text: string | RegExp,
|
||||
options?: { normalizeWhitespace: boolean }
|
||||
options?: {| normalizeWhitespace: boolean |}
|
||||
): void,
|
||||
toHaveValue(value?: string | string[] | number): void,
|
||||
|
||||
// 5.x
|
||||
toHaveDisplayValue(value: string | string[]): void,
|
||||
toBeChecked(): void,
|
||||
...
|
||||
};
|
||||
|
||||
// Jest JQuery Matchers: https://github.com/unindented/custom-jquery-matchers
|
||||
@@ -254,7 +274,7 @@ type JestJQueryMatchersType = {
|
||||
toHaveText(text: string | RegExp): void,
|
||||
toHaveData(key: string, val?: any): void,
|
||||
toHaveValue(val: any): void,
|
||||
toHaveCss(css: { [key: string]: any }): void,
|
||||
toHaveCss(css: { [key: string]: any, ... }): void,
|
||||
toBeChecked(): void,
|
||||
toBeDisabled(): void,
|
||||
toBeEmpty(): void,
|
||||
@@ -266,6 +286,7 @@ type JestJQueryMatchersType = {
|
||||
toBeMatchedBy(sel: string): void,
|
||||
toHaveDescendant(sel: string): void,
|
||||
toHaveDescendantWithText(sel: string, text: string | RegExp): void,
|
||||
...
|
||||
};
|
||||
|
||||
// Jest Extended Matchers: https://github.com/jest-community/jest-extended
|
||||
@@ -290,78 +311,64 @@ type JestExtendedMatchersType = {
|
||||
* Use .toBeEmpty when checking if a String '', Array [] or Object {} is empty.
|
||||
*/
|
||||
toBeEmpty(): void,
|
||||
|
||||
/**
|
||||
* Use .toBeOneOf when checking if a value is a member of a given Array.
|
||||
* @param {Array.<*>} members
|
||||
*/
|
||||
toBeOneOf(members: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeNil` when checking a value is `null` or `undefined`.
|
||||
*/
|
||||
toBeNil(): void,
|
||||
|
||||
/**
|
||||
* Use `.toSatisfy` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean`.
|
||||
* @param {Function} predicate
|
||||
*/
|
||||
toSatisfy(predicate: (n: any) => boolean): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeArray` when checking if a value is an `Array`.
|
||||
*/
|
||||
toBeArray(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeArrayOfSize` when checking if a value is an `Array` of size x.
|
||||
* @param {Number} x
|
||||
*/
|
||||
toBeArrayOfSize(x: number): void,
|
||||
|
||||
/**
|
||||
* Use `.toIncludeAllMembers` when checking if an `Array` contains all of the same members of a given set.
|
||||
* @param {Array.<*>} members
|
||||
*/
|
||||
toIncludeAllMembers(members: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the members of a given set.
|
||||
* @param {Array.<*>} members
|
||||
*/
|
||||
toIncludeAnyMembers(members: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toSatisfyAll` when you want to use a custom matcher by supplying a predicate function that returns a `Boolean` for all values in an array.
|
||||
* @param {Function} predicate
|
||||
*/
|
||||
toSatisfyAll(predicate: (n: any) => boolean): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeBoolean` when checking if a value is a `Boolean`.
|
||||
*/
|
||||
toBeBoolean(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeTrue` when checking a value is equal (===) to `true`.
|
||||
*/
|
||||
toBeTrue(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeFalse` when checking a value is equal (===) to `false`.
|
||||
*/
|
||||
toBeFalse(): void,
|
||||
|
||||
/**
|
||||
* Use .toBeDate when checking if a value is a Date.
|
||||
*/
|
||||
toBeDate(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeFunction` when checking if a value is a `Function`.
|
||||
*/
|
||||
toBeFunction(): void,
|
||||
|
||||
/**
|
||||
* Use `.toHaveBeenCalledBefore` when checking if a `Mock` was called before another `Mock`.
|
||||
*
|
||||
@@ -371,42 +378,34 @@ type JestExtendedMatchersType = {
|
||||
* @param {Mock} mock
|
||||
*/
|
||||
toHaveBeenCalledBefore(mock: JestMockFn<any, any>): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeNumber` when checking if a value is a `Number`.
|
||||
*/
|
||||
toBeNumber(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeNaN` when checking a value is `NaN`.
|
||||
*/
|
||||
toBeNaN(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeFinite` when checking if a value is a `Number`, not `NaN` or `Infinity`.
|
||||
*/
|
||||
toBeFinite(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBePositive` when checking if a value is a positive `Number`.
|
||||
*/
|
||||
toBePositive(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeNegative` when checking if a value is a negative `Number`.
|
||||
*/
|
||||
toBeNegative(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeEven` when checking if a value is an even `Number`.
|
||||
*/
|
||||
toBeEven(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeOdd` when checking if a value is an odd `Number`.
|
||||
*/
|
||||
toBeOdd(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeWithin` when checking if a number is in between the given bounds of: start (inclusive) and end (exclusive).
|
||||
*
|
||||
@@ -414,144 +413,122 @@ type JestExtendedMatchersType = {
|
||||
* @param {Number} end
|
||||
*/
|
||||
toBeWithin(start: number, end: number): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeObject` when checking if a value is an `Object`.
|
||||
*/
|
||||
toBeObject(): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainKey` when checking if an object contains the provided key.
|
||||
*
|
||||
* @param {String} key
|
||||
*/
|
||||
toContainKey(key: string): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainKeys` when checking if an object has all of the provided keys.
|
||||
*
|
||||
* @param {Array.<String>} keys
|
||||
*/
|
||||
toContainKeys(keys: string[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAllKeys` when checking if an object only contains all of the provided keys.
|
||||
*
|
||||
* @param {Array.<String>} keys
|
||||
*/
|
||||
toContainAllKeys(keys: string[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAnyKeys` when checking if an object contains at least one of the provided keys.
|
||||
*
|
||||
* @param {Array.<String>} keys
|
||||
*/
|
||||
toContainAnyKeys(keys: string[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainValue` when checking if an object contains the provided value.
|
||||
*
|
||||
* @param {*} value
|
||||
*/
|
||||
toContainValue(value: any): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainValues` when checking if an object contains all of the provided values.
|
||||
*
|
||||
* @param {Array.<*>} values
|
||||
*/
|
||||
toContainValues(values: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAllValues` when checking if an object only contains all of the provided values.
|
||||
*
|
||||
* @param {Array.<*>} values
|
||||
*/
|
||||
toContainAllValues(values: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAnyValues` when checking if an object contains at least one of the provided values.
|
||||
*
|
||||
* @param {Array.<*>} values
|
||||
*/
|
||||
toContainAnyValues(values: any[]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainEntry` when checking if an object contains the provided entry.
|
||||
*
|
||||
* @param {Array.<String, String>} entry
|
||||
*/
|
||||
toContainEntry(entry: [string, string]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainEntries` when checking if an object contains all of the provided entries.
|
||||
*
|
||||
* @param {Array.<Array.<String, String>>} entries
|
||||
*/
|
||||
toContainEntries(entries: [string, string][]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAllEntries` when checking if an object only contains all of the provided entries.
|
||||
*
|
||||
* @param {Array.<Array.<String, String>>} entries
|
||||
*/
|
||||
toContainAllEntries(entries: [string, string][]): void,
|
||||
|
||||
/**
|
||||
* Use `.toContainAnyEntries` when checking if an object contains at least one of the provided entries.
|
||||
*
|
||||
* @param {Array.<Array.<String, String>>} entries
|
||||
*/
|
||||
toContainAnyEntries(entries: [string, string][]): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeExtensible` when checking if an object is extensible.
|
||||
*/
|
||||
toBeExtensible(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeFrozen` when checking if an object is frozen.
|
||||
*/
|
||||
toBeFrozen(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeSealed` when checking if an object is sealed.
|
||||
*/
|
||||
toBeSealed(): void,
|
||||
|
||||
/**
|
||||
* Use `.toBeString` when checking if a value is a `String`.
|
||||
*/
|
||||
toBeString(): void,
|
||||
|
||||
/**
|
||||
* Use `.toEqualCaseInsensitive` when checking if a string is equal (===) to another ignoring the casing of both strings.
|
||||
*
|
||||
* @param {String} string
|
||||
*/
|
||||
toEqualCaseInsensitive(string: string): void,
|
||||
|
||||
/**
|
||||
* Use `.toStartWith` when checking if a `String` starts with a given `String` prefix.
|
||||
*
|
||||
* @param {String} prefix
|
||||
*/
|
||||
toStartWith(prefix: string): void,
|
||||
|
||||
/**
|
||||
* Use `.toEndWith` when checking if a `String` ends with a given `String` suffix.
|
||||
*
|
||||
* @param {String} suffix
|
||||
*/
|
||||
toEndWith(suffix: string): void,
|
||||
|
||||
/**
|
||||
* Use `.toInclude` when checking if a `String` includes the given `String` substring.
|
||||
*
|
||||
* @param {String} substring
|
||||
*/
|
||||
toInclude(substring: string): void,
|
||||
|
||||
/**
|
||||
* Use `.toIncludeRepeated` when checking if a `String` includes the given `String` substring the correct number of times.
|
||||
*
|
||||
@@ -559,13 +536,35 @@ type JestExtendedMatchersType = {
|
||||
* @param {Number} times
|
||||
*/
|
||||
toIncludeRepeated(substring: string, times: number): void,
|
||||
|
||||
/**
|
||||
* Use `.toIncludeMultiple` when checking if a `String` includes all of the given substrings.
|
||||
*
|
||||
* @param {Array.<String>} substring
|
||||
*/
|
||||
toIncludeMultiple(substring: string[]): void,
|
||||
...
|
||||
};
|
||||
|
||||
// Diffing snapshot utility for Jest (snapshot-diff)
|
||||
// https://github.com/jest-community/snapshot-diff
|
||||
type SnapshotDiffType = {
|
||||
/**
|
||||
* Compare the difference between the actual in the `expect()`
|
||||
* vs the object inside `valueB` with some extra options.
|
||||
*/
|
||||
toMatchDiffSnapshot(
|
||||
valueB: any,
|
||||
options?: {|
|
||||
expand?: boolean,
|
||||
colors?: boolean,
|
||||
contextLines?: number,
|
||||
stablePatchmarks?: boolean,
|
||||
aAnnotation?: string,
|
||||
bAnnotation?: string,
|
||||
|},
|
||||
testName?: string
|
||||
): void,
|
||||
...
|
||||
};
|
||||
|
||||
interface JestExpectType {
|
||||
@@ -574,7 +573,8 @@ interface JestExpectType {
|
||||
DomTestingLibraryType &
|
||||
JestJQueryMatchersType &
|
||||
JestStyledComponentsMatchersType &
|
||||
JestExtendedMatchersType;
|
||||
JestExtendedMatchersType &
|
||||
SnapshotDiffType;
|
||||
/**
|
||||
* If you have a mock function, you can use .lastCalledWith to test what
|
||||
* arguments it was last called with.
|
||||
@@ -845,7 +845,7 @@ type JestObjectType = {
|
||||
* Returns the actual module instead of a mock, bypassing all checks on
|
||||
* whether the module should receive a mock implementation or not.
|
||||
*/
|
||||
requireActual(moduleName: string): any,
|
||||
requireActual<T>(m: $Flow$ModuleRef<T> | string): T,
|
||||
/**
|
||||
* Returns a mock module instead of the actual module, bypassing all checks
|
||||
* on whether the module should be required normally or not.
|
||||
@@ -856,14 +856,12 @@ type JestObjectType = {
|
||||
* useful to isolate modules where local state might conflict between tests.
|
||||
*/
|
||||
resetModules(): JestObjectType,
|
||||
|
||||
/**
|
||||
* Creates a sandbox registry for the modules that are loaded inside the
|
||||
* callback function. This is useful to isolate specific modules for every
|
||||
* test so that local module state doesn't conflict between tests.
|
||||
*/
|
||||
isolateModules(fn: () => void): JestObjectType,
|
||||
|
||||
/**
|
||||
* Exhausts the micro-task queue (usually interfaced in node via
|
||||
* process.nextTick).
|
||||
@@ -913,7 +911,7 @@ type JestObjectType = {
|
||||
* (setTimeout, setInterval, clearTimeout, clearInterval, nextTick,
|
||||
* setImmediate and clearImmediate).
|
||||
*/
|
||||
useFakeTimers(): JestObjectType,
|
||||
useFakeTimers(mode?: 'modern' | 'legacy'): JestObjectType,
|
||||
/**
|
||||
* Instructs Jest to use the real versions of the standard timer functions.
|
||||
*/
|
||||
@@ -932,16 +930,15 @@ type JestObjectType = {
|
||||
* Note: The default timeout interval is 5 seconds if this method is not called.
|
||||
*/
|
||||
setTimeout(timeout: number): JestObjectType,
|
||||
...
|
||||
};
|
||||
|
||||
type JestSpyType = {
|
||||
calls: JestCallsType,
|
||||
};
|
||||
type JestSpyType = { calls: JestCallsType, ... };
|
||||
|
||||
type JestDoneFn = {
|
||||
(): void,
|
||||
type JestDoneFn = {|
|
||||
(error?: Error): void,
|
||||
fail: (error: Error) => void,
|
||||
};
|
||||
|};
|
||||
|
||||
/** Runs this function after every test inside this context */
|
||||
declare function afterEach(
|
||||
@@ -970,17 +967,14 @@ declare var describe: {
|
||||
* Creates a block that groups together several related tests in one "test suite"
|
||||
*/
|
||||
(name: JestTestName, fn: () => void): void,
|
||||
|
||||
/**
|
||||
* Only run this describe block
|
||||
*/
|
||||
only(name: JestTestName, fn: () => void): void,
|
||||
|
||||
/**
|
||||
* Skip running this describe block
|
||||
*/
|
||||
skip(name: JestTestName, fn: () => void): void,
|
||||
|
||||
/**
|
||||
* each runs this test against array of argument arrays per each run
|
||||
*
|
||||
@@ -993,6 +987,7 @@ declare var describe: {
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
) => void,
|
||||
...
|
||||
};
|
||||
|
||||
/** An individual test unit */
|
||||
@@ -1009,7 +1004,6 @@ declare var it: {
|
||||
fn?: (done: JestDoneFn) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
|
||||
/**
|
||||
* Only run this test
|
||||
*
|
||||
@@ -1017,11 +1011,12 @@ declare var it: {
|
||||
* @param {Function} Test
|
||||
* @param {number} Timeout for the test, in milliseconds.
|
||||
*/
|
||||
only(
|
||||
name: JestTestName,
|
||||
fn?: (done: JestDoneFn) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): {
|
||||
only: {|
|
||||
(
|
||||
name: JestTestName,
|
||||
fn?: (done: JestDoneFn) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
each(
|
||||
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
|
||||
): (
|
||||
@@ -1029,8 +1024,7 @@ declare var it: {
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
) => void,
|
||||
},
|
||||
|
||||
|},
|
||||
/**
|
||||
* Skip running this test
|
||||
*
|
||||
@@ -1043,14 +1037,12 @@ declare var it: {
|
||||
fn?: (done: JestDoneFn) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
|
||||
/**
|
||||
* Highlight planned tests in the summary output
|
||||
*
|
||||
* @param {String} Name of Test to do
|
||||
*/
|
||||
todo(name: string): void,
|
||||
|
||||
/**
|
||||
* Run the test concurrently
|
||||
*
|
||||
@@ -1063,7 +1055,6 @@ declare var it: {
|
||||
fn?: (done: JestDoneFn) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
|
||||
/**
|
||||
* each runs this test against array of argument arrays per each run
|
||||
*
|
||||
@@ -1076,6 +1067,7 @@ declare var it: {
|
||||
fn?: (...args: Array<any>) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
) => void,
|
||||
...
|
||||
};
|
||||
|
||||
declare function fit(
|
||||
@@ -1095,16 +1087,37 @@ declare var xit: typeof it;
|
||||
declare var xtest: typeof it;
|
||||
|
||||
type JestPrettyFormatColors = {
|
||||
comment: { close: string, open: string },
|
||||
content: { close: string, open: string },
|
||||
prop: { close: string, open: string },
|
||||
tag: { close: string, open: string },
|
||||
value: { close: string, open: string },
|
||||
comment: {
|
||||
close: string,
|
||||
open: string,
|
||||
...
|
||||
},
|
||||
content: {
|
||||
close: string,
|
||||
open: string,
|
||||
...
|
||||
},
|
||||
prop: {
|
||||
close: string,
|
||||
open: string,
|
||||
...
|
||||
},
|
||||
tag: {
|
||||
close: string,
|
||||
open: string,
|
||||
...
|
||||
},
|
||||
value: {
|
||||
close: string,
|
||||
open: string,
|
||||
...
|
||||
},
|
||||
...
|
||||
};
|
||||
|
||||
type JestPrettyFormatIndent = string => string;
|
||||
type JestPrettyFormatIndent = (string) => string;
|
||||
type JestPrettyFormatRefs = Array<any>;
|
||||
type JestPrettyFormatPrint = any => string;
|
||||
type JestPrettyFormatPrint = (any) => string;
|
||||
type JestPrettyFormatStringOrNull = string | null;
|
||||
|
||||
type JestPrettyFormatOptions = {|
|
||||
@@ -1135,7 +1148,8 @@ type JestPrettyFormatPlugin = {
|
||||
opts: JestPrettyFormatOptions,
|
||||
colors: JestPrettyFormatColors
|
||||
) => string,
|
||||
test: any => boolean,
|
||||
test: (any) => boolean,
|
||||
...
|
||||
};
|
||||
|
||||
type JestPrettyFormatPlugins = Array<JestPrettyFormatPlugin>;
|
||||
@@ -1151,10 +1165,10 @@ declare var expect: {
|
||||
DomTestingLibraryType &
|
||||
JestJQueryMatchersType &
|
||||
JestStyledComponentsMatchersType &
|
||||
JestExtendedMatchersType,
|
||||
|
||||
JestExtendedMatchersType &
|
||||
SnapshotDiffType,
|
||||
/** Add additional Jasmine matchers to Jest's roster */
|
||||
extend(matchers: { [name: string]: JestMatcher }): void,
|
||||
extend(matchers: { [name: string]: JestMatcher, ... }): void,
|
||||
/** Add a module that formats application-specific data structures. */
|
||||
addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void,
|
||||
assertions(expectedAssertions: number): void,
|
||||
@@ -1168,10 +1182,12 @@ declare var expect: {
|
||||
stringMatching(value: string | RegExp): string,
|
||||
not: {
|
||||
arrayContaining: (value: $ReadOnlyArray<mixed>) => Array<mixed>,
|
||||
objectContaining: (value: {}) => Object,
|
||||
objectContaining: (value: { ... }) => Object,
|
||||
stringContaining: (value: string) => string,
|
||||
stringMatching: (value: string | RegExp) => string,
|
||||
...
|
||||
},
|
||||
...
|
||||
};
|
||||
|
||||
// TODO handle return type
|
||||
@@ -1195,7 +1211,8 @@ declare var jasmine: {
|
||||
createSpyObj(
|
||||
baseName: string,
|
||||
methodNames: Array<string>
|
||||
): { [methodName: string]: JestSpyType },
|
||||
): { [methodName: string]: JestSpyType, ... },
|
||||
objectContaining(value: Object): Object,
|
||||
stringMatching(value: string): string,
|
||||
...
|
||||
};
|
Reference in New Issue
Block a user