How to make Flow aware of Jest's globals (test, expect, etc)?

1.5k Views Asked by At

I get these Flow errors in my test files:

identifier `test`
Could not resolve name

identifier `expect`
Could not resolve name

I've installed the Jest libdef from flow-typed but it doesn't make any difference.


Update: it looks like the Jest libdef created by flow-typed is just a stub. I think the problem is that flow-typed doesn't have a libdef for Jest v0.21.x yet.

1

There are 1 best solutions below