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

Write better tests #26

Open
langmore opened this issue Mar 27, 2014 · 0 comments
Open

Write better tests #26

langmore opened this issue Mar 27, 2014 · 0 comments

Comments

@langmore
Copy link
Contributor

I (langmore) made some mistakes when writing initial test suites, and future tests could be improved.

Test behavior, not implementation.

  • Test the public API in more depth.
  • Test private functions/methods only when necessary. These tests are hard to maintain and have no reason to hold up under refactoring...the most important time for a test to hold up is when you refactor.

Use descriptive test names

  • The test name should make it clear what use case the test is testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant