Ayrton
Ayrton
Looks like I'm in need of this myself, I'll be working on a solution for this sometime soon 😊
We at Product Hunt don't use TDD-style assertions, I think it's unlikely we will build this ourselves. We are however open to any improvements/additions if the code is not too...
chai-enzyme doesn't do any deep comparisons by default, nor does chai afaik, you have to explicitly add the flag: ``` js const component = shallow(); expect(component).to.have.state('items').deep.equal([]); ``` I agree that...
> Occasionally I have situations where I want to do assertions on markup that might have child nodes inserted into it. I would tackle this problem differently and test the...
For future reference there's [`chai-equal-jsx`](https://github.com/echenley/chai-equal-jsx).
Can you please elaborate a bit more. The following expectation seems to be valid: ``` js expect('faz').not.to.eq('bar'); ```
Can you edit your example to a complete reproducible bug. Both the component and tests without any cruft please, I can have a look at what might possibly be wrong...
I have tried to reproduce this issue with the following code: ``` js class Fixture extends React.Component { render () { return ( ) } } const it = createTest()...
@droarty that's right - this was also reported in #83, the offer still stands a PR to emphasise this behaviour is greatly appreciated. Thanks for explaining btw @ljharb
What happens when you do: ```js expect(reportLink).to.have.attr('href', props.href); ```