gpt4 book ai didi

angular - Firefox/Chrome 未在 2000 毫秒内被杀死,发送 SIGKILL

转载 作者:行者123 更新时间:2023-12-05 06:48:04 26 4
gpt4 key购买 nike

在我的本地 angular(v10) 项目中运行 ng 测试 后,所有测试用例都成功执行,浏览器也启动了,我能够看到绿点,但最后在我的命令提示符中出现以下警告时浏览器被杀死

enter image description here

karma .config.js

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
'karma-jasmine',
'karma-firefox-launcher',
'karma-jasmine-html-reporter',
'karma-coverage-istanbul-reporter',
'@angular-devkit/build-angular/plugins/karma',
'karma-junit-reporter',
'karma-sonarqube-unit-reporter'
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage'),
reports: [ 'html', 'lcovonly', 'text-summary' ],
fixWebpackSourcePaths: true
},
sonarQubeUnitReporter: {
sonarQubeVersion: 'LATEST',
outputFile: 'reports/ut_report.xml',
overrideTestDescription: true,
testPaths: ['./ng-app'],
testFilePattern: '.spec.ts',
useBrowserName: false
},
junitReporter: {
outputDir: 'angular_junit_reporter', // results will be saved as $outputDir/$browserName.xml
outputFile: 'karma_unit_test', // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: '', // suite will become the package name attribute in xml testsuite element
useBrowserName: true, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {}, // key value pair of properties to add to the <properties> section of the report
xmlVersion: null // use '1' if reporting to be per SonarQube 6.2 XML format
},
angularCli: {
environment: 'dev',
codeCoverage: true
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml', 'sonarqubeUnit', 'junit'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Firefox'],
singleRun: true,
restartOnFileChange: false,
captureTimeout: 210000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout : 210000,
browserNoActivityTimeout : 210000
});
};

这里有什么问题吗?

最佳答案

将您的值(value)观更改为:-自动 watch :真,单次运行:假,

可选更改,可能需要也可能不需要restartOnFileChange: true

删除冒号前的空格:-浏览器断开连接超时:210000,浏览器无事件超时:210000

关于angular - Firefox/Chrome 未在 2000 毫秒内被杀死,发送 SIGKILL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66927882/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com