Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Conversation

@wldcordeiro
Copy link
Contributor

Summary of Changes

  • Revert usage of Jest runners for linting/prettier
  • Jest 23 upgrade!

@jasonLaster requested this as we were seeing some weirdness and large outputs.

```js
it("should call handleClick function", () => {
const onClick = jest.genMockFunction();
const onClick = jest.fn();
Copy link
Contributor Author

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.

jestjs/jest#6173

```js
it("should render a button", () => {
const onClick = jest.genMockFunction();
const onClick = jest.fn();
Copy link
Contributor Author

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.

jestjs/jest#6173

| Type | Command |
| -------- | ------------------- |
| all | `yarn run lint` |
| css | `yarn run lint:css` |
Copy link
Contributor Author

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 :

addLineClass: jest.fn(),
removeLineClass: jest.fn(),
markText: jest.genMockFunction().mockReturnValue({ clear }),
markText: jest.fn(() => ({ clear })),
Copy link
Contributor Author

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.

jestjs/jest#6173

import ResultList from "../ResultList";

const selectItem = jest.genMockFunction();
const selectItem = jest.fn();
Copy link
Contributor Author

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.

jestjs/jest#6173

function generateDefaults(overrides) {
return {
selectLocation: jest.genMockFunction(),
selectLocation: jest.fn(),
Copy link
Contributor Author

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.

jestjs/jest#6173

@wldcordeiro wldcordeiro force-pushed the rollback-jest-runners branch from c70464d to eae9fa5 Compare May 25, 2018 03:42
@jasonLaster jasonLaster merged commit 7f6157a into firefox-devtools:master May 25, 2018
@wldcordeiro wldcordeiro deleted the rollback-jest-runners branch May 25, 2018 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants