Open filipenatanael opened 5 years ago
Hello Everyone,
So I'm getting the below error message when trying to run the tests.
expect(wrapper).to.have.style('background-color').equal('#ccc');
But when I write the code as below, everything works correctly.
expect(wrapper.props().style.backgroundColor).to.be.equal('#ccc');
Any of yours have gone through this before?
@filipenatanael isn't wrapper an enzyme wrapper, so it doesn't have any style actually on it? you should look for the wrapping html element instead for the styles to show.
wrapper
Hello Everyone,
So I'm getting the below error message when trying to run the tests.
expect(wrapper).to.have.style('background-color').equal('#ccc');
But when I write the code as below, everything works correctly.
expect(wrapper.props().style.backgroundColor).to.be.equal('#ccc');
Any of yours have gone through this before?