【发布时间】:2015-11-06 04:35:06
【问题描述】:
我正在尝试将量角器测试结果导出到 xml 文件,因为我已经使用
安装了 jasmine-reportersnpm install -g jasmine-reporters.
量角器版本是Version 2.1.0。
jasmine-reporters 版2.0.7
这是我的 protracotr 配置文件:
exports.config = {
seleniumAddress: 'http://localhost:4455/wd/hub',
capabilities: {
'browserName': 'chrome'
},
specs: [
'student_spec.js'
],
onPrepare: function() {
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.JUnitXmlReporter(null, true, true, '/test/e2e/JasmineReporter')
);
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 50000
}
};
当我运行量角器时,我收到此错误
Error: Cannot find module 'jasmine-reporters'
帮帮我,我做错了什么。
【问题讨论】:
-
尝试安装不带
-g标志的jasmine-reporters。 -
仍然出现此错误:错误:未定义不是函数
标签: angularjs node.js jasmine protractor