-
Notifications
You must be signed in to change notification settings - Fork 759
Revert Jest Runners for linting and upgrade Jest to 23 🎉 #6412
Revert Jest Runners for linting and upgrade Jest to 23 🎉 #6412
Conversation
@@ -515,7 +515,7 @@ We shallow render the component and simulate an UI interaction like `click`. | |||
|
|||
```js | |||
it("should call handleClick function", () => { | |||
const onClick = jest.genMockFunction(); | |||
const onClick = jest.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genMockFunction
was removed and was an undocumented API. Removing it from our examples and code.
@@ -529,7 +529,7 @@ We shallow render the component to a JSON and save it to a fixture. Subsequent r | |||
|
|||
```js | |||
it("should render a button", () => { | |||
const onClick = jest.genMockFunction(); | |||
const onClick = jest.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genMockFunction
was removed and was an undocumented API. Removing it from our examples and code.
| Type | Command | | ||
| -------- | ------------------- | | ||
| all | `yarn run lint` | | ||
| css | `yarn run lint:css` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We swapped back and forth on using -
and :
in the config so I just settled on :
@@ -15,7 +15,7 @@ function createMockDocument(clear) { | |||
const doc = { | |||
addLineClass: jest.fn(), | |||
removeLineClass: jest.fn(), | |||
markText: jest.genMockFunction().mockReturnValue({ clear }), | |||
markText: jest.fn(() => ({ clear })), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genMockFunction
was removed and was an undocumented API. Removing it from our examples and code.
@@ -6,7 +6,7 @@ import React from "react"; | |||
import { shallow } from "enzyme"; | |||
import ResultList from "../ResultList"; | |||
|
|||
const selectItem = jest.genMockFunction(); | |||
const selectItem = jest.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genMockFunction
was removed and was an undocumented API. Removing it from our examples and code.
@@ -17,7 +17,7 @@ const mockFunctionText = "mock function text"; | |||
|
|||
function generateDefaults(overrides) { | |||
return { | |||
selectLocation: jest.genMockFunction(), | |||
selectLocation: jest.fn(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genMockFunction
was removed and was an undocumented API. Removing it from our examples and code.
c70464d
to
eae9fa5
Compare
Summary of Changes
@jasonLaster requested this as we were seeing some weirdness and large outputs.