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:
renovate[bot]
2020-09-12 13:28:51 +09:00
committed by GitHub
parent 7a37d128c7
commit 6599158921
7 changed files with 120 additions and 103 deletions

View File

@@ -1,5 +1,5 @@
[version] [version]
0.132.0 0.133.0
[ignore] [ignore]
<PROJECT_ROOT>/dist <PROJECT_ROOT>/dist

View File

@@ -1,6 +1,6 @@
{ {
"name": "eslint", "name": "eslint",
"version": "7.7.0-pnpify", "version": "7.8.1-pnpify",
"main": "./lib/api.js", "main": "./lib/api.js",
"type": "commonjs" "type": "commonjs"
} }

View File

@@ -1,5 +1,5 @@
{ {
"name": "flow-bin", "name": "flow-bin",
"version": "0.132.0-pnpify", "version": "0.133.0-pnpify",
"type": "commonjs" "type": "commonjs"
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "stylelint", "name": "stylelint",
"version": "13.6.1-pnpify", "version": "13.7.1-pnpify",
"main": "lib/index.js", "main": "lib/index.js",
"type": "commonjs" "type": "commonjs"
} }

View File

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

View File

@@ -43,7 +43,7 @@
"eslint-plugin-flowtype": "^5.2.0", "eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-react": "^7.20.3", "eslint-plugin-react": "^7.20.3",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",
"flow-bin": "^0.132.0", "flow-bin": "^0.133.0",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",
"husky": "^4.2.5", "husky": "^4.2.5",
"istanbul-lib-coverage": "^3.0.0", "istanbul-lib-coverage": "^3.0.0",

View File

@@ -5345,12 +5345,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"flow-bin@npm:^0.132.0": "flow-bin@npm:^0.133.0":
version: 0.132.0 version: 0.133.0
resolution: "flow-bin@npm:0.132.0" resolution: "flow-bin@npm:0.133.0"
bin: bin:
flow: cli.js flow: cli.js
checksum: ecaa7ff45608831e4a7634d3232dcb4114733036a58a4cc41403b37cfa073af55d8b7cedc11c308c41527c0728440d35628a62c2dc05d27a2d3f3d4d134132c6 checksum: b767946fb8763372127d7c7fd013a8c39de2066e59e19210aba17e6e7bb772bdd19f225b90466ca02bcdb2523463d59eb10d15f671d1ea024612219ed9f44fb2
languageName: node languageName: node
linkType: hard linkType: hard
@@ -7675,7 +7675,7 @@ fsevents@^1.2.7:
eslint-plugin-flowtype: ^5.2.0 eslint-plugin-flowtype: ^5.2.0
eslint-plugin-react: ^7.20.3 eslint-plugin-react: ^7.20.3
file-loader: ^6.0.0 file-loader: ^6.0.0
flow-bin: ^0.132.0 flow-bin: ^0.133.0
fs-extra: ^9.0.1 fs-extra: ^9.0.1
husky: ^4.2.5 husky: ^4.2.5
istanbul-lib-coverage: ^3.0.0 istanbul-lib-coverage: ^3.0.0