Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Move from Should to Chai (Expect) in Test suites #1081

Closed
mleanos opened this issue Nov 30, 2015 · 5 comments
Closed

Move from Should to Chai (Expect) in Test suites #1081

mleanos opened this issue Nov 30, 2015 · 5 comments

Comments

@mleanos
Copy link
Member

mleanos commented Nov 30, 2015

How do you all feel about moving from Should, to using Chai & Expect?

I've recently made this move on the server-side of an existing MEANJS application to use Chai, and I'm really liking the framework much better. The Expect assertions are much more robust & easier to read.

If it's decided on that we make this move, then I propose we take one Test suite at a time & update to use Chai; starting with the server-side tests.

Any thoughts/concerns?

@lirantal
Copy link
Member

Hi Michael,

If there is no considerable gain of value then I don't see why we should invest in that at this point.

@mleanos
Copy link
Member Author

mleanos commented Nov 30, 2015

Hello there Liran :)

I completely understand your concern. I think it may be worth a minor discussion.

The benefits that I've found are that it's easier to deal with complex objects, null & undefined values. And it's much easier to read, as your skimming through the Test code.

Other than that, it's I don't have much else to offer for why Chai is better :)

@ilanbiala
Copy link
Member

I don't see how should can't deal with those values and changing the tests one by one would be really bad. I'm -1 on this, mostly because we can invest our time into new features and better stuff, when the tests aren't unreadable in any way and the documentation for should is pretty good.

@codydaig
Copy link
Member

codydaig commented Dec 1, 2015

I prefer expect, however, I have to agree that it's not worth the effort to switch.

@mleanos
Copy link
Member Author

mleanos commented Dec 1, 2015

Alright.. SGTM. Thanks guys.

I'm closing this now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants