Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Remove describe from jest/no-if #235

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Remove describe from jest/no-if #235

merged 1 commit into from
Apr 9, 2019

Conversation

cartogram
Copy link
Contributor

@cartogram cartogram commented Apr 9, 2019

This PR Removes describe from the checked function names of jest/no-if.

I tested this rule out in a few projects and if statements in afterEach/ beforeEach blocks and in general within describe blocks is a valid thing to do.

} = require('../../utilities/jest');
const {getTestMethodName} = require('../../utilities/jest');

const TEST_FUNCTION_NAMES = ['it', 'xit', 'fit', 'test', 'xtest'];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the clearest thing is to just redefine these locally for this test.

@@ -1761,13 +1761,6 @@ eslint-plugin-jsx-a11y@6.2.1:
has "^1.0.3"
jsx-ast-utils "^2.0.1"

eslint-plugin-lodash@5.1.0:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake leftover from a previous pr.

Copy link
Contributor

@patsissons patsissons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

})`,
code: `fit('foo', () => {
if('bar') {}
})`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space?

@cartogram cartogram merged commit a603711 into master Apr 9, 2019
@cartogram cartogram deleted the fix-no-if branch April 9, 2019 01:43
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