Skip to content
#

chai

Here are 1,100 public repositories matching this topic...

browne0
browne0 commented Jun 25, 2019

Hello! Big fan of enzyme here.

I use Enzyme a lot for unit testing and I've noticed recently that people are consistently recommending people use instance prop functions versus using the simulate behavior provided by Enzyme because of the bad implementation.

Is there anyway we could get the docs updated with what the preferred solution is? It's not really clear as the docs stand right now.

guidobouman
guidobouman commented Aug 21, 2019

The and method is not supported by Jest, where Chai does support it.

It should probably cut the assertion in two:

- expect(ticketNumber).to.be.above(0).and.to.be.below(46)
+ expect(ticketNumber).toBeGreaterThan(0)
+ expect(ticketNumber).toBeLessThan(46)

Is this a feasible option for codemods?

If so: I'm willing to work on a PR.

Loading…
You can’t perform that action at this time.