Jest is a Javascript test runner for automated testing.

Usage

Vue

Pair with Vue Test Utils to test Vue applications with Jest.

Gotchas

  • If any tests in a suite are asynchronous, make sure all setup is in a beforeEach or beforeAll callback. If setup is in the describe callback, the final describe callback’s setup will run before any of the tests have completed resulting in that setup being in place for all tests in the file.

Links