0
我使用運行業力測試運行以下角劇本,但我得到的錯誤karma start ./karma.conf.js ERROR [config]: Error in config file! Unexpected token =]
AngularCLI噶測試不圓CI
的文件運行在我的Windows本地機器不錯,但給人錯誤,當我把它放在到位桶並運行它使用循環CI(持續集成)
我注意到,當我更改karma.conf.js並將其放在bitbucket上時,出現以下警告: C:\ Users \ Manu \ Documents \ manu \ programs \ web \ angular \ dw-ng2-app> git add --all
warning: LF will be replaced by CRLF in karma.conf.js.
The file will have its original line endings in your working directory.
噶文件
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};