Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kick off testing with test for hasNextPages #3

Merged
merged 3 commits into from
Sep 4, 2014

Conversation

esco
Copy link
Contributor

@esco esco commented Aug 30, 2014

No description provided.


```bash
$ npm run coverage
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really include this in the readme as it isn't that important, the people who want to know test results by hand will know npm test anyways.

@@ -0,0 +1,2 @@
var chai = require('chai');
chai.should();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what advantage does this have over regular should?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The apis are pretty similar. This seems more like a philosophical question, especially since its a dev dependency. I wouldn't say either has a clear advantage over the other. Speed, filesize, and usability are basically the same. Chai is more active in terms of development. Consistency could be an issue since I notice most of the modules in this org use should, but I also haven't seen any of them using sinon.

I typically go with chai because of domenic's awesome https://github.com/domenic/sinon-chai. I had intended to write a few more tests that would've involved using sinon (making sure next() is being called in the middleware function) but took it out since I didn't have enough free time to do it properly. I'd prefer to keep it chai. What do you think? Have you used both?

@esco esco mentioned this pull request Sep 4, 2014
niftylettuce added a commit that referenced this pull request Sep 4, 2014
kick off testing with test for hasNextPages
@niftylettuce niftylettuce merged commit 5b5a08c into expressjs:master Sep 4, 2014
@Fishrock123
Copy link

FWIW we are going to be moving away from should entirely (jshttp/style-guide#13)..

(edit: well, probably by the looks of it)

@esco
Copy link
Contributor Author

esco commented Sep 4, 2014

@Fishrock123 interesting. You might want to look more into chai's should before switching back to assert. Its been a huge time saver for me.

@Fishrock123
Copy link

@esco mind writing your thoughts over there? :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants