Gruntjs Travis CI与grunt contrib茉莉花试验呈假阳性

Gruntjs Travis CI与grunt contrib茉莉花试验呈假阳性,gruntjs,jasmine,travis-ci,grunt-contrib-jasmine,Gruntjs,Jasmine,Travis Ci,Grunt Contrib Jasmine,在与Travis CI集成之后,我注意到当某个规范文件出于某种原因抛出错误时,可能会出现误报 所有的档案都在特拉维斯身上 Running "jshint:files" (jshint) task Verifying property jshint.files exists in config...OK Options: force=false, reporterOutput=null, jshintrc=".jshintrc", ignores=["bower_components/**"] O

在与Travis CI集成之后,我注意到当某个规范文件出于某种原因抛出错误时,可能会出现误报

所有的档案都在特拉维斯身上

Running "jshint:files" (jshint) task
Verifying property jshint.files exists in config...OK
Options: force=false, reporterOutput=null, jshintrc=".jshintrc", ignores=["bower_components/**"]
OK
>> 29 files lint free.
但当幻影启动时,其中一个规格失效,这只发生在特拉维斯内部。我希望其他同事可以签出一份新的回购协议,并顺利地执行相同的咕噜任务

Testing jasmine specs via phantom
>> Error: xhrFailed at
>> http:/localhost:8000/bower_components/dojo/dojo.js:301 
>> http:/localhost:8000/bower_components/dojo/dojo.js:1509 
>> http:/localhost:8000/bower_components/dojo/dojo.js:93 
>> http:/localhost:8000/bower_components/dojo/dojo.js:728 
>> http:/localhost:8000/bower_components/dojo/dojo.js:1247 
>> http:/localhost:8000/bower_components/dojo/dojo.js:746 
>> http:/localhost:8000/bower_components/dojo/dojo.js:791 
>> http:/localhost:8000/bower_components/dojo/dojo.js:124 
>> http:/localhost:8000/widgets/tests/spec/SpecSearch.js:379 
Jasmine Runner Starting...
这个错误被忽略了,其他规范文件也会运行,如果它们都通过了,travis认为一切正常

我们有什么办法来对付这个问题?基本上,整个规范文件将不会加载或运行,但我们有一个构建:传递图像。我希望能够信任CI,而不必查看输出


我可以在本地使用grunt travis运行74个测试,但在travis上运行时,它通过了55个测试。

作为一种解决方法,您也可以将jshint添加到CI设置中。@LajosVeres linting是CI设置的一部分。没有绒线错误。就像我说的,我可以在本地运行,而不会看到这个问题。只有在travis服务器上调用时才会发生。也许我误解了什么。您编写了“规范文件…无法解析”。我的想法是用jshint检测这种不良状态。(它还检测分析错误。)无论如何,这只是一个解决方法。如果你能找到一个合适的解决方案,你应该选择它。@LajosVeres我更新了措辞并粘贴了linting输出作为证据。我刚刚在测试文件中发现了问题:当文件本身出现问题时,所有套件都会无声地传递。更糟糕的是,对于一些还不了解的问题,我的linted文件出现了误报。两年后,你有关于这个话题的新信息或线索吗?