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

Update: Refactor tests (closes #103) #110

Merged
merged 8 commits into from
Sep 26, 2016
Merged

Update: Refactor tests (closes #103) #110

merged 8 commits into from
Sep 26, 2016

Conversation

phated
Copy link
Member

@phated phated commented Sep 23, 2016

  • Updated to use the same techniques as other projects for tests.
  • Switched to expect for assertions.
  • Renamed/kebab-case the test files (other files will be renamed as part of repo normalization)
  • Added/split some tests
  • 100% code coverage

@contra please review.

@darsain
Copy link
Contributor

darsain commented Sep 23, 2016

Just out of curiosity since it irked me when I was writing tests for normalization. Why do you use done() in synchronous tests?

@phated
Copy link
Member Author

phated commented Sep 23, 2016

@darsain we use the --async-only flag with mocha. This helps to catch subtle bugs, like not passing an error callback to an actually-async test. It is a hold-over (and I'd say a good one) from my dislikes with mocha and my time with lab. I really think using function arity to do async/sync magic is bad practice.

@phated
Copy link
Member Author

phated commented Sep 26, 2016

Looks like everyone is too busy to review this. Going to merge.

@phated phated merged commit d466540 into master Sep 26, 2016
@phated phated deleted the test-refactor branch September 26, 2016 21:11
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
phated added a commit that referenced this pull request Sep 27, 2016
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