Episode 11 - April 6, 2020

Test Driven Development (feat. Sarah Dayan)

00:00 / 00:00

This episode is sponsored by...

Special offer - $20 off

An exclusive offer for Enjoy the Vue listeners, sign up today and use promo code 'VUE2020' to receive $20 towards your new account.

Code: VUE2020

Shownotes

About our guest: Sarah Dyan

This week we are joined by Sarah Dayan. Sarah currently works for Algolia as a Staff Software Engineer as a Tech Lead of the Doc Squad. If you’ve ever gone on the Vue.js documentation, than you’ve used Algolia. You may have seen Sarah speak about Test Driven Development (TDD) at VueConf in Toronto or Vue.js Amsterdam. In this episode we get to pick Sarah’s brain about TDD. Where do you start, what do you test, what don’t you test?

[00:02:37] Sarah was on the docket to speak at VueConfUS. Since it got cancelled, she shares those of us Stateside all about testing in Vue and why TDD is great.

[00:05:25] Ari asks Sarah about what a contract in a component and what it means. Sarah breaks this down with a very simple example, a button.

[00:09:50] Ben gets Sarah’s thoughts on end to end testing. She makes a case for Test Driven Development applying to more than just unit tests.

[00:15:51] Tessa who saw one of Sarah’s presentations on TDD, asks her about her “tip” on when to test and when not to test. Sarah puts it simply, the question to ask is: “Do I care about it if it changes?”.

[00:21:40] Sarah give us some good practices that you may want to implement when testing. Whether you are doing unit or end to end testing.

[00:24:51] After Tessa asks Sarah about Snapshot Tests and whether a link text fits in a Unit Test. Sarah believes Snapshot Tests are better when you want to test logs or code. She feels they should not be used in place of Unit Tests, since they cannot test behaviour.

[00:28:33] Ben talks about how some Dev’s have an obsession with getting 100’s on Code Coverage Reports. Sarah goes into how not to get caught up in the “vanity metrics”. The group joke around how it that obsession may originate from gaming and how we have to collect every coin and badge.

[00:34:23] Tessa enquires about testing for accessibility.

[00:39:34] Ari gives an example of working at a fast paced start-up, and whether or not TDD can reconcile when you don’t have clear cut requirements. Is it even possible? Sarah shows how it can save money since everything won’t need to be retested by hand.

Sarah's picks

Tessa's picks

Other resources mentioned

Transcript

Coming soon!