3min chapter

Elixir Wizards cover image

Kate Rezentes on GenServers at Simplebet

Elixir Wizards

CHAPTER

X Unit Test

Property tests use gen servers. You would write a test that like tickets dot new ticket returns a response and then inside of that test you're going to write assert receive. The test is going to wait for this gen server to send a response, which can be up to 100 milliseconds or it could slow your test down but it might fix a broken test there. Just put it where it doesn't the gen server right doesn't work put it in your supervision tree just watch it all unplugged yeah right implosion driven development oh my god oh point here first so one thing that sunday did was make me realize how much I don't know about property tests. So welcome to the part.

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