jest-workshop-commit-2018

How this repo works

There will be a bunch of examples and you can move to the examples just like you move between branches.

git checkout 01-basic-jest
// To check the solution
git checkout 01-basic-jest-solution

Examples

  • 01-basic-jest

  • 01-basic-jest-solution

  • 02-jest-react-setup

    • install jest
    • install test renderer enzyme enzyme-adapter-react-16
    • configure enzyme adapter
    • one test
  • 03-snapshots

    • Explain importance of snapshots and simplicity
    • snapshot header component
    • snapshot not only react components
  • 03-snapshots-solution

  • 04-components-tdd

    • Button component
    • App layout
  • 04-components-tdd-solution

  • 05-async-mocks

    • review fetch call to an external API
    • Mocks and test for async call
  • 05-async-mocks-solution

  • 06-full-application-unit-testing

    • overview application
    • redux unit testing
    • component unit testing snapshot
  • 06-full-application-unit-testing-solution

  • 07-full-aplication-integration-testing

    • overview what integration tests are
    • mocking api calls
    • afterAll beforeAll
  • 07-full-aplication-integration-solution

Links

Home

Jest configuration

Jest snapshot

enzyme

React test renderer

Expect assertions