Skip to content

Commit cf361f1

Browse files
committed
Fix no-identical-title when there is no title
Fixes #317.
1 parent c1cd7da commit cf361f1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rules/no-identical-title.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const create = context => {
3232
const titleNode = args.length > 1 || ava.hasTestModifier('todo') ? args[0] : undefined;
3333

3434
// Don't flag computed titles
35-
if (!isStatic(titleNode)) {
35+
if (!titleNode || !isStatic(titleNode)) {
3636
return;
3737
}
3838

test/no-identical-title.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ruleTester.run('no-identical-title', rule, {
3333
` ${header}
3434
const macro = (t, value) => { t.true(value); };
3535
36+
test(macro, true);
3637
test('should work', macro, true);
3738
test('should fail', macro, false);
3839
`,

0 commit comments

Comments
 (0)