What’s the right way to write Jest tests verified with Flow?

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
  }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)