Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tag-failures
Browse files Browse the repository at this point in the history
Conflicts:
	lib/index.js
  • Loading branch information
AsaAyers committed Apr 14, 2015
2 parents e52b7e5 + e7d1373 commit 72ecb69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ describe('props', () => {
});
});

it('does not warn if onClick is null', () => {
doNotExpectWarning(assertions.props.onClick.NO_LABEL.msg, () => {
<div onClick={null}/>;
});
});

it('does not warn if onClick is undefined', () => {
doNotExpectWarning(assertions.props.onClick.NO_LABEL.msg, () => {
<div onClick={undefined}/>;
});
});

it('does not warn if there is an aria-label', () => {
doNotExpectWarning(assertions.props.onClick.NO_LABEL.msg, () => {
<div aria-label="foo" onClick={k}/>;
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var assertAccessibility = (tagName, props, children) => {

var propTests;
for (var propName in props) {
if (props[propName] === null || props[propName] === undefined) continue;
propTests = assertions.props[propName] || [];
for (key in propTests)
if (propTests[key] && !propTests[key].test(tagName, props, children))
Expand Down

0 comments on commit 72ecb69

Please sign in to comment.