DEV Community

Discussion on: Demonstrating TDD (Test-driven development) in Go

 
quii profile image
Chris James • Edited

From the link I sent you above

  • Write a small test for a small amount of desired behaviour
  • Check the test fails with a clear error (red)
  • Write the minimal amount of code to make the test pass (green)
  • Refactor
  • Repeat.

If you want a more involved tutorial read github.com/quii/learn-go-with-tests