【发布时间】:2015-03-07 00:29:21
【问题描述】:
我的 conf.js 中有这个
onPrepare: function() {
/**if comment out then spec runs, if uncomment then spec doesn't run
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
filePrefix: 'portal_tests_xmloutput',
savePath: './test_results_report'
})); **/
},
};
在我的 test_spec.js 中有
fdescribe('my tests', function() {
it('test1', function(){
});
fit('test2', function(){
});
it('test3', function(){
});
}
当我运行我的测试时,它会输出
[launcher] Running 1 instances of WebDriver
Started
No specs found
Finished in 0.002 seconds
如果我在我的 conf.js 中注释掉 jasmine 记者声明并再次运行,它将运行正确的测试并输出
[launcher] Running 1 instances of WebDriver
Started
test2
.
1 spec, 0 failures
Finished in 5.675 seconds
为什么 jasmine-reporters 会干扰重点规范测试?我希望在使用 fdescribe 和 fit 运行时启用 jasmine-reporters。我正在使用
量角器:1.8.0 茉莉花记者:2.0.4
【问题讨论】:
标签: jasmine protractor