VoV 023: Unit Testing Vue components‌ with Edd Yerburgh

    0
    376

    Panel:

    • Divya Sasidharan
    • Chris Fritz
    • Joe Eames

    Special Guests: Edd Yerburgh

    In this episode, the Views on Vue panel talks to Edd Yerburgh about unit testing Vue components. Edd is a software engineer for BBC in London and he maintains Vue Test Utils, which is a library to help make unit testing Vue components easier.  They talk about how you would use Vue Test Utils, examples of components you would test with Vue Test Utils, and good patterns to use when testing. They also touch on snapshot testing, the Vue Jest library, and more!

    In particular, we dive pretty deep on:

    • Edd intro
    • Maintains Vue Test Utils
    • What is Vue Test Utils?
    • Library to make unit testing Vue components easier
    • What is a mounted component?
    • Would you use Vue Test Utils by yourself?
    • Jest, Jasmine, and Mocha
    • Needs to be run in a DOM environment
    • JS DOM
    • Examples of components that you would use to test with Vue Test Utils
    • What are good patterns to use when testing?
    • Consider what and if you should test?
    • Difficult to give a definitive answer as to when you should unit test vs you shouldn’t
    • What you hope when you are writing unit tests
    • Tests as a form of documentation
    • Writing unit tests to pay off in the future
    • What is a Snapshot test?
    • When would you use a snapshot test?
    • Leaning on Jest for snapshot tests
    • Vue Jest library
    • Testing in Vue
    • Creating components within your test itself
    • Testing a mixin
    • And much, much more!

    Links:

    Sponsors

    Picks:

    Divya

    Chris

    • Having a point to stop working at night
    • ASMR

    Joe

    Edd