diff --git a/README.md b/README.md index d9d35791aff8..d6769869b0fe 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ like ``` The -[React](https://github.com/facebook/react/tree/master/src/renderers/shared/reconciler/__tests__), +[React](https://github.com/facebook/react/tree/master/src/renderers/shared/stack/reconciler/__tests__), [Relay](https://github.com/facebook/relay/tree/master/src/container/__tests__) and [react-native](https://github.com/facebook/react-native/tree/master/Libraries/Animated/src/__tests__) repositories have excellent examples of tests written by Facebook engineers. @@ -285,6 +285,7 @@ just added. - [`jest.disableAutomock()`](https://facebook.github.io/jest/docs/api.html#jest-disableautomock) - [`jest.enableAutomock()`](https://facebook.github.io/jest/docs/api.html#jest-enableautomock) - [`jest.fn(?implementation)`](https://facebook.github.io/jest/docs/api.html#jest-fn-implementation) + - [`jest.isMockFunction(fn)`](https://facebook.github.io/jest/docs/api.html#jest-ismockfunction-implementation) - [`jest.genMockFromModule(moduleName)`](https://facebook.github.io/jest/docs/api.html#jest-genmockfrommodule-modulename) - [`jest.mock(moduleName, ?factory)`](https://facebook.github.io/jest/docs/api.html#jest-mock-modulename-factory) - [`jest.runAllTicks()`](https://facebook.github.io/jest/docs/api.html#jest-runallticks) @@ -426,6 +427,9 @@ implementation. console.log(returnsTrue()) // true; ``` +### `jest.isMockFunction(fn)` +Determines if the given function is a mocked function. + ### `jest.genMockFromModule(moduleName)` Given the name of a module, use the automatic mocking system to generate a mocked version of the module for you. diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index c63fa84ff2ae..bebefb9aa66b 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -112,7 +112,7 @@ like ``` The -[React](https://github.com/facebook/react/tree/master/src/renderers/shared/reconciler/__tests__), +[React](https://github.com/facebook/react/tree/master/src/renderers/shared/stack/reconciler/__tests__), [Relay](https://github.com/facebook/relay/tree/master/src/container/__tests__) and [react-native](https://github.com/facebook/react-native/tree/master/Libraries/Animated/src/__tests__) repositories have excellent examples of tests written by Facebook engineers.