开玩笑-从'setup.js'中找不到模块'setupDevtools' [英] Jest - Cannot find module 'setupDevtools' from 'setup.js'
本文介绍了开玩笑-从'setup.js'中找不到模块'setupDevtools'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在研究Jest,并且尝试将其添加到我的组件=> github.com/bolket/react-native-scrollview-smart.
I am studying Jest and i am trying to add it to my component => github.com/bolket/react-native-scrollview-smart.
我开始测试时出现此错误:
When i start my test i have this error:
$ jest
FAIL lib/ScrollViewSmart.test.js
● Test suite failed to run
Cannot find module 'setupDevtools' from 'setup.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
at Object.<anonymous> (node_modules/react-native/jest/setup.js:30:1)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.492s
经过多次尝试,我将测试移到了__DEV__
文件夹中,并且错误已解决.
After many attempts i have moved the test in __DEV__
folder and the error has been resolved.
这篇关于开玩笑-从'setup.js'中找不到模块'setupDevtools'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文