2min chapter

Go Time: Golang, Software Engineering cover image

Sarah Adams on Test2Doc and Women Who Go

Go Time: Golang, Software Engineering

CHAPTER

How Do You Write Unit Tests?

Tests are really just like if this is the request that the user sends, what should the appropriate response be? And that's exactly what documentation is also. So when you're writing your tests, how much differently do you write your tests to make the documents look appropriate? Do you have to? Not at all. It's super simple. There's like maybe six lines of code that you have to add. But essentially, if you have really good, really thorough unit tests, like testing for user passes nil and user passes opposed with no request data and all of that, all of those requests are captured. When you can see in the documentation, when you pass nil, this happens.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode