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

Configure unit tests and coverage report #11

Open
0xHericles opened this issue Aug 21, 2021 · 0 comments
Open

Configure unit tests and coverage report #11

0xHericles opened this issue Aug 21, 2021 · 0 comments
Labels
Type: New Feature ➕ Introduction of a completely new addition to the codebase Type: Testing 🧪 Add testing or improving existing testing of a file, feature, or codebase

Comments

@0xHericles
Copy link
Member

Description

Go's built-in support for unit testing makes it easier to test as you go. The testing package provides the tools we need to write unit tests and the go test command runs tests.

Tips

  • Use -race to enable the built-in data race detector.
  • Use -v to log all tests as they are run. Also print all text from Log and Logf calls even if the test succeeds.
  • User -cover to enable coverage analysis.
@0xHericles 0xHericles added Type: New Feature ➕ Introduction of a completely new addition to the codebase Type: Testing 🧪 Add testing or improving existing testing of a file, feature, or codebase labels Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature ➕ Introduction of a completely new addition to the codebase Type: Testing 🧪 Add testing or improving existing testing of a file, feature, or codebase
Projects
None yet
Development

No branches or pull requests

1 participant