Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prefer bare test and nested it #195

Merged
merged 1 commit into from Mar 16, 2021
Merged

Conversation

kellyjosephprice
Copy link
Contributor

@kellyjosephprice kellyjosephprice commented Mar 16, 2021

Adapted from the plugin docs:

/*eslint jest/consistent-test-it: ["error", {"fn": "test", "withinDescribe": "it"}]*/

test('foo'); // valid
describe('foo', function () {
  it('bar'); // valid
});

it('foo'); // invalid
describe('foo', function () {
  test('bar'); // invalid
});

@kellyjosephprice kellyjosephprice requested review from erunion and a team and removed request for a team March 16, 2021 00:49
@kellyjosephprice kellyjosephprice added the enhancement New feature or request label Mar 16, 2021
@@ -13,7 +13,7 @@ module.exports = {
rules: {
'import/no-extraneous-dependencies': 'off',

Copy link
Member

Choose a reason for hiding this comment

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

What's this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adapted from the plugin docs:

/*eslint jest/consistent-test-it: ["error", {"fn": "test", "withinDescribe": "it"}]*/

test('foo'); // valid
describe('foo', function () {
  it('bar'); // valid
});

it('foo'); // invalid
describe('foo', function () {
  test('bar'); // invalid
});

@erunion erunion merged commit f7aaca9 into master Mar 16, 2021
@erunion erunion deleted the jest/consistent-test-it branch March 16, 2021 05:41
@erunion
Copy link
Member

erunion commented Mar 16, 2021

published to v5.0.1

@kellyjosephprice
Copy link
Contributor Author

Thanks!

@kellyjosephprice
Copy link
Contributor Author

This doesn't work currently:
jest-community/eslint-plugin-jest#795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants