skills/smithery.ai/Write unit tests

Write unit tests

Installation
SKILL.md

Write unit tests

Best practices

  • Unit tests should go into tests named for the functions being tested.
    • If you have a function Foo, you should have a test function named TestFoo.
    • Methods with receivers should include the name of the receiver's type. A method like func (f *Foo) Bar() {...} should have a test named TestFooBar.
  • Tests should only test the behavior of the function. Don't exhaustively test every possible input.
  • Each behavior you test should have a test case. If you have more than two test cases, use table-driven tests.
Installs
1
First Seen
Mar 19, 2026
Write unit tests from smithery.ai