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(rules): Add no-empty-title rule #238

Merged
merged 17 commits into from Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -96,6 +96,7 @@ for more information about extending configuration files.
| [lowercase-name][] | Disallow capitalized test names | | ![fixable-green][] |
| [no-alias-methods][] | Disallow alias methods | ![recommended][] | ![fixable-green][] |
| [no-disabled-tests][] | Disallow disabled tests | ![recommended][] | |
| [no-empty-title][] | Disallow disabled tests | ![recommended][] | |
SimenB marked this conversation as resolved.
Show resolved Hide resolved
| [no-focused-tests][] | Disallow focused tests | ![recommended][] | |
| [no-hooks][] | Disallow setup and teardown hooks | | |
| [no-identical-title][] | Disallow identical titles | ![recommended][] | |
Expand Down Expand Up @@ -131,6 +132,7 @@ for more information about extending configuration files.
[lowercase-name]: docs/rules/lowercase-name.md
[no-alias-methods]: docs/rules/no-alias-methods.md
[no-disabled-tests]: docs/rules/no-disabled-tests.md
[no-empty-title]: docs/rules/no-empty-title.md
[no-focused-tests]: docs/rules/no-focused-tests.md
[no-hooks]: docs/rules/no-hooks.md
[no-identical-title]: docs/rules/no-identical-title.md
Expand Down
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -42,6 +42,7 @@ module.exports = {
rules: {
'jest/no-alias-methods': 'warn',
'jest/no-disabled-tests': 'warn',
'jest/no-empty-title': 'error',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/no-jest-import': 'error',
Expand Down
2 changes: 2 additions & 0 deletions rules/__tests__/no-empty-title.js
Expand Up @@ -11,6 +11,8 @@ const ruleTester = new RuleTester({

ruleTester.run('no-empty-title', rule, {
valid: [
'someFn("", function () {})',
'describe(1, function () {})',
'describe("foo", function () {})',
'describe("foo", function () { it("bar", function () {}) })',
'test("foo", function () {})',
Expand Down