Skip to content

Update: Refactor tests (closes #103)#110

Merged
phated merged 8 commits intomasterfrom
test-refactor
Sep 26, 2016
Merged

Update: Refactor tests (closes #103)#110
phated merged 8 commits intomasterfrom
test-refactor

Conversation

@phated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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