与业力测试运行程序有关的错误
我的karma.config.js
// Karma configuration
// Generated on Tue Apr 26 2016 09:56:05 GMT+0530 (India Standard Time)
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine-ajax', 'jasmine', 'requirejs'],
proxies: {
'/src/': '/base/src/',
'/src/common': '/base/src/common',
'/node_modules/': '/base/node_modules/',
'/styles/': '/base/styles/'
},
reportSlowerThan: 500,
// list of files / patterns to load in the browser
files: [
"test-main.js",
{ pattern: "src/common.min.js", included: true },
{ pattern: "spec/**/*.spec.js", included: false },
{ pattern: 'node_modules/es6-promise/dist/es6-promise.js', included: false },
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots', 'html'],
// the default html configuration
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless', 'Chrome', 'Firefox'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,
coverageReporter: {
type: "html",
check: {
each: {
statements: 90,
branches: 90,
functions: 100,
lines: 90
}
}
}
})
}
业力版本:0.13.2
gulp任务以运行测试
gulp.task('test', function (done) {
new karma.Server({
configFile: path.resolve('./karma.conf.js'),
singleRun: false,
browsers: ['Chrome'],
browserNoActivityTimeout: 30000
}, function (e) {
done(e === 0 ? null : 'karma exited with status ' + e);
}).start();
});
我在詹金斯中遇到控制台错误
[HeadlessChrome 71.0.3578(Linux 0.0.0)]:[39mDisconnected(1次),因为在30000毫秒内没有消息。
在浏览器中我遇到错误
已暂停潜在的内存不足崩溃