enzymejs / chai-enzyme

Chai.js assertions and convenience functions for testing React Components with enzyme
MIT License
787 stars 72 forks source link

Allow for newer versions of chai and cheerio. #188

Closed ThePumpingLemma closed 7 years ago

ThePumpingLemma commented 7 years ago

Ideally, you would want to run a test harness for both versions if you plan on supporting 3.x for a while.

ayrton commented 7 years ago

Any ideas how we can run the different versions via travis? And if doable, can we include this in the PR?

ThePumpingLemma commented 7 years ago

It's a little tricky because the package explicitly installs a version as a dev dependency. Ideally for this case, it would be only a peer dependency and we would have different versions installed in Travis' before_install hooks. Not convenient for local dev though.

Maybe install as normal and override the version with a second install?

ThePumpingLemma commented 7 years ago

Okay, I made separate envs for explicitly installing each chai version. Let me know if you have suggestions for better approaches.

ljharb commented 7 years ago

You'd let the dev dep range match the peer dep range, and then manually install the desired chai version in the matrix install step.

ThePumpingLemma commented 7 years ago

Okay, I'll give that a shot.

ThePumpingLemma commented 7 years ago

Should I take a similar approach for cheerio or is that overkill?

ljharb commented 7 years ago

I'd say that's probably overkill :-)

ThePumpingLemma commented 7 years ago

Cool. Tests appear to be passing. :+1:

ayrton commented 7 years ago

@ThePumpingLemma thank you for your contributions. @ljharb thanks for leading on this