First off. Star the repo here https://github.com/facebook/jest so you can show some love for the hardwork that has been put into it.
I was an early adopter of Jest back in the early days ( ~v0.4). It was okay but difficult to setup and slow with sometimes weird results and behaviors.
Tireless effort has been done by Christoph Pojer to get to the latest Jest (v16.01) so props to him and others working with him.
Check out the fantastic documentation here https://facebook.github.io/jest/docs/getting-started.html
Migrating in seconds
There is almost nothing to write about on this topic because it was almost too easy. Mostly because of jest-codemods. It is a set of codemods crafted to transition your Tape or Ava project to Jest.
It is worth it. Jest has come along way when it comes to speed, functionality, configuration options, and ease of configuration (or lack there of to get started).
There were minor configurations I had to setup, but most were copying and pasting from the documentation.
Lets dive into the process real quick.
First and last step to transition tests
npm install -g jest-codemods
jest-codemods in a desired directory.
It will prompt you with
Tape, or a
Then you provide a glob. I was running in my root so I provided the glob
**/__tests__/**/*.js to convert all of my tests.
That was it.