Although Jest is written with flow annotations they strip types for the npm version so we don’t need babel to run it. Fortunately the types are already in flow-type so the solution is quite easy (just as mentioned in the comment):
npm install -g flow-typed
flow-typed install jest@22.x.x # <-- replace the version with the latest
Although I had to add this line as well to my .eslintrc.json
:
{
"env": {
"jest": true
}
}