app/frontend/comments/vote_button_component.test.jsx in decidim-comments-0.0.3 vs app/frontend/comments/vote_button_component.test.jsx in decidim-comments-0.0.5
- old
+ new
@@ -10,10 +10,10 @@
const voteAction = sinon.spy();
stubComponent(Icon);
it("should render the number of votes passed as a prop", () => {
const wrapper = shallow(<VoteButton votes={10} buttonClassName="vote-button" iconName="vote-icon" voteAction={voteAction} />);
- expect(wrapper.find('button')).to.include.text(10);
+ expect(wrapper.find('button').text()).to.match(/10/);
});
it("should render a button with the given buttonClassName", () => {
const wrapper = shallow(<VoteButton votes={10} buttonClassName="vote-button" iconName="vote-icon" voteAction={voteAction} />);
expect(wrapper.find('button.vote-button')).to.be.present();