Skip to content

Commit

Permalink
Added test for function invocation of bool #2602
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkovar committed Jul 2, 2020
1 parent 6fc4bc0 commit da6ced5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/lib/rules/boolean-prop-naming.js
Expand Up @@ -900,5 +900,20 @@ ruleTester.run('boolean-prop-naming', rule, {
errors: [{
message: 'Prop name (failingItIs) doesn\'t match rule (^is[A-Z]([A-Za-z0-9]?)+)'
}]
}, {
code: `
import { bool } from 'prop-types';
var Hello = createReactClass({
propTypes: {something: bool},
render: function() { return <div />; }
});
`,
options: [{
rule: '^is[A-Z]([A-Za-z0-9]?)+',
validateNested: true
}],
errors: [{
message: 'Prop name (something) doesn\'t match rule (^is[A-Z]([A-Za-z0-9]?)+)'
}]
}]
});

0 comments on commit da6ced5

Please sign in to comment.