Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Take a snapshot - ngvikings

Take a snapshot - ngvikings

Bo Vandersteene

May 28, 2019
Tweet

More Decks by Bo Vandersteene

Other Decks in Programming

Transcript

  1. • A lot of lines • Forget code to test

    • Hard to define all cases • Nice feedback • ...
  2. • Creates the snapshot if it doesn’t exist • Compares

    expectation to stored snapshot • Performs a diff
  3. • Creates the snapshot if it doesn’t exist • Compares

    expected to stored snapshot • Performs a diff • Easily update snapshot on refactor
  4. • Creates the snapshot if it doesn’t exist • Compares

    expected to stored snapshot • Performs a diff • Easily update snapshot on refactor
  5. Globals afterAll afterEach beforeAll beforeEach describe.each describe.only describe.only.each describe.skip describe.skip.each

    test.each test.only test.only.each test.skip test.skip.each test.todo describe test