mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Type mock.contexts correctly in Jest (#37847)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37847 Jest supports accessing the contexts used to call mock functions (the `this` value) but we're not typing that correctly in the definitions in React Native. This changes that. Changelog: [internal] Reviewed By: javache Differential Revision: D46684043 fbshipit-source-id: ff121e0726748788591e7d061a39fde238c1ddbe
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1e332b8630
commit
b46992de8a
Vendored
+4
@@ -38,6 +38,10 @@ type JestMockFn<TArguments: $ReadOnlyArray<any>, TReturn> = {
|
||||
* instantiated from this mock function.
|
||||
*/
|
||||
instances: Array<TReturn>,
|
||||
/**
|
||||
* An array that contains the contexts for all calls of the mock function.
|
||||
*/
|
||||
contexts: Array<mixed>,
|
||||
/**
|
||||
* An array that contains all the object results that have been
|
||||
* returned by this mock function call
|
||||
|
||||
Reference in New Issue
Block a user