If you've been following this tutorial, you'd have the following file structure: Unit testing With unit testing we just want to verify that the tested functions work as expected in isolation, so we will mock database behavior. I like having the tests I write next to the files where the functions reside. file: internal/router/health_test.go package router_test import "testing" func TestHealth

Testing your routes
Andres Court·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.