2017-09-14 67 views
6

我在我的测试文件中得到这些流程的错误:如何使Flow知道Jest的全局变量(测试,期望等)?

identifier `test` 
Could not resolve name 

identifier `expect` 
Could not resolve name 

我已经安装了流量类型的玩笑libdef,但它并没有任何区别。


更新:它看起来像由flow-typed创建的Jest libdef只是一个存根。我认为问题在于流式输入没有用于Jest v0.21.x的libdef。

回答