Skip to content

Commit

Permalink
Add another test case
Browse files Browse the repository at this point in the history
Since the bug being fixed here depends on the relative order of the
spread props and the `rel` attribute, add a second test case with the
opposite order to protect against regressions.
  • Loading branch information
randycoulman committed Jul 13, 2016
1 parent eaab3fa commit 3db97e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/lib/rules/jsx-no-target-blank.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ruleTester.run('jsx-no-target-blank', rule, {
{code: '<a href="foobar"></a>', parserOptions: parserOptions},
{code: '<a randomTag></a>', parserOptions: parserOptions},
{code: '<a href="foobar" target="_blank" rel="noopener noreferrer"></a>', parserOptions: parserOptions},
{code: '<a target="_blank" {...spreadProps} rel="noopener noreferrer"></a>', parserOptions: parserOptions}
{code: '<a target="_blank" {...spreadProps} rel="noopener noreferrer"></a>', parserOptions: parserOptions},
{code: '<a target="_blank" rel="noopener noreferrer" {...spreadProps}></a>', parserOptions: parserOptions}
],
invalid: [
{code: '<a target="_blank"></a>', parserOptions: parserOptions,
Expand Down

0 comments on commit 3db97e4

Please sign in to comment.