Supercharge your Tests with Snapshot Testing


Unit tests are a fundamental defense line to avoid subtle bugs from sneaking into our code base. The problem is that writing them can sometimes feel like a tedious, repetitive and error prone chore.

That’s when snapshot testing comes into play. It makes an alluring promise: completely rid the developer of the boring task of having to manually write and manage unit tests’ assertions! While it may sound too good to be true, there’s no magic trick and we’ll discover the ins and outs of snapshot testing in Gleam: what it is, how it works and, most importantly, how to use it effectively.

Key Takeaways: In this talk we’ll:

  • Discover what snapshot testing is and how it works
  • Learn some best practices to write effective snapshot tests
  • Learn about snapshot testing in Gleam using the “birdie” package
  • See how Gleam’s design and focus on simplicity helped shape and inform birdie’s API

Target Audience:

  • This talk will be a great fit for anyone curious to learn about snapshot testing and Gleam. You don’t have to know any Gleam to be able to follow along with the code example!

testing, gleam, fp