Testing Icon


Testing is the practice of systematically checking if code functions as intended.
3 Stories
All Topics

Node.js Icon

Automatic visual diffing with Puppeteer

Monica Dinculescu: I did a little song-and-dance that sets up Puppeteer , takes screenshots of your app (like, all the routes you care about), and then compares them to the “golden” ones. If they match, your test passes! It only works with Chrome (because Puppeteer), but that's not a big deal since this is the kind of thing you only put in your devDependencies. The results are super cool in your test suite output:

logged by @jerodsanto 2018-02-05T21:35:00.011605Z permalink #node #javascript #testing

Elixir Icon

Behaviour-Driven Unit Testing for Phoenix Controllers

This is a great introduction to the Mox library written by José Valim and the Plataformatec team. Mox' philosophy: A simple summary is that when it comes to dependency injection, mocks should not be created ad-hoc. Instead, they should be constrained by predefined behaviours. This helps enforce contracts between modules, and it also makes tests easier to maintain and understand. We've been using the Mock library when testing against 3rd party services, and it works as advertised. However, we don't test our controllers in isolation like in this post. Should we be?

logged by @jerodsanto 2018-01-10T18:35:00.15910Z permalink #elixir #testing
0:00 / 0:00