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

Add a coherent unit test framework #156

Merged
merged 3 commits into from
Dec 12, 2016
Merged

Add a coherent unit test framework #156

merged 3 commits into from
Dec 12, 2016

Conversation

dan-f
Copy link
Contributor

@dan-f dan-f commented Dec 7, 2016

This PR is part of the effort I outlined in #151. This is just meant to create a consistent framework for adding unit tests. Further work will be required for integration/higher level tests.

Given that BDD-style test frameworks have become the de-facto standard, I added mocha and chai, which are both more actively maintained than tape and nodeunit. I created some example tests, and converted the old tape tests to the new BDD style as well.

I couldn't figure out the term.js and uri.js unit tests that use nodeunit, so I haven't tried to convert them yet, but rather stuck them in their own directory. If someone is more familiar with them, perhaps they could help convert them to mocha.

@timbl @dmitrizagidulin thoughts?

@dan-f
Copy link
Contributor Author

dan-f commented Dec 7, 2016

I forgot to mention - this was also spurred by wanting to make a code change to how Literals choose their numeric datatypes, so there's a change there. The idea is that in JS, all numbers are 64 bit IEEE doubles. Integer/double/decmial types are chosen based on the precision of the provided value.

@dmitrizagidulin
Copy link
Contributor

Looks great to me. Thanks for doing this!

@dan-f dan-f merged commit 0bbc061 into master Dec 12, 2016
@dan-f dan-f deleted the dan-f/add-mocha-tests branch December 12, 2016 16:40
@deiu deiu removed the in progress label Dec 12, 2016
@dmitrizagidulin
Copy link
Contributor

Wait a second, what happened to this code? :) I'm not seeing this merged PR in the master branch at all!

@dan-f
Copy link
Contributor Author

dan-f commented Dec 28, 2016

:( did someone git push -f origin master?

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

Successfully merging this pull request may close these issues.

3 participants