以下设置为我的package.jsonJest TypeError:路径必须是字符串。收到undefined
如果我从命令行运行npm test
所有jest测试用例都正确执行。 如果我直接使用命令jest
命令行我收到此错误:在任何测试文件
Test suite failed to run
TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.relative (path.js:538:5)
出现这种情况。
任何想法可能是错的,以及如何解决它?
"scripts": {
"test": "standard && jest",
"format": "standard --fix",
"start": "webpack-dev-server --config webpack.config.dev.js",
"build": "webpack --config webpack.config.prod.js"
},
我有同样的问题,迄今为止没有帮助。 – Simoroshka