Skip to content

Commit

Permalink
Remove invalid attribute test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail committed Aug 21, 2017
1 parent 47d2416 commit 38adb22
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -446,24 +446,6 @@ describeWithDOM('mount', () => {
expect(wrapper.find('[type=text]')).to.have.lengthOf(2);
});

// React 15.2 warns when setting a non valid prop to an DOM element
describeIf(REACT013 || REACT014, 'unauthorized dom props', () => {
it('should not find components with invalid attributes', () => {
// Invalid attributes aren't valid JSX, so manual instantiation is necessary
const wrapper = mount(
React.createElement('div', null, React.createElement('span', {
'123-foo': 'bar',
'-foo': 'bar',
'+foo': 'bar',
})),
);

expect(wrapper.find('[-foo]')).to.have.length(0, '-foo');
expect(wrapper.find('[+foo]')).to.have.length(0, '+foo');
expect(wrapper.find('[123-foo]')).to.have.length(0, '123-foo');
});
});

it('should support data prop selectors', () => {
const wrapper = mount(
<div>
Expand Down

0 comments on commit 38adb22

Please sign in to comment.