Skip to content

Commit

Permalink
use a tag instead of button tag
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Oct 19, 2018
1 parent 3017080 commit 620722c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Expand Up @@ -2474,13 +2474,13 @@ describe('shallow', () => {
render() {
return (
<div>
<a onClick={spy}>foo</a>
<button onClick={spy}>foo</button>
</div>
);
}
}
const wrapper = shallow(<Foo />);
const value = wrapper.find('a').invoke('onClick');
const value = wrapper.find('button').invoke('onClick');
expect(value).to.equal(123);
expect(spy.called).to.equal(true);
});
Expand All @@ -2490,15 +2490,15 @@ describe('shallow', () => {
render() {
return (
<div>
<a onClick={spy}>foo</a>
<button onClick={spy}>foo</button>
</div>
);
}
}
const wrapper = shallow(<Foo />);
const a = {};
const b = {};
wrapper.find('a').invoke('onClick', a, b);
wrapper.find('button').invoke('onClick', a, b);
expect(spy.args[0][0]).to.equal(a);
expect(spy.args[0][1]).to.equal(b);
});
Expand Down

0 comments on commit 620722c

Please sign in to comment.