Chrome 87.0.4280 (Windows 10.0.0):执行了 0 个空值(跳过 229)错误(34.875 秒/0 秒)
Chrome 87.0.4280 (Windows 10.0.0): Executed 0 of null (skipped 229) ERROR (34.875 secs / 0 secs)
我正在尝试使用 jasmine 3.2.0 和 karma 测试我的项目 angular 8.3.26,但它向我显示此错误:
Chrome 87.0.4280 (Windows 10.0.0) ERROR
DisconnectedClient disconnected from CONNECTED state (ping timeout)
和
Chrome 87.0.4280 (Windows 10.0.0): Executed 0 of null (skipped 229) ERROR (34.875 secs / 0 secs)
karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/my-pro'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
captureTimeout: 60000, // it was already there
browserDisconnectTolerance : 1,
browserNoActivityTimeout: 60000,
browserDisconnectTimeout: 60000
});
};
查看了Whosebug中的解决方案,但问题并没有解决,
你有解决这个问题的意见吗?
这是我的计算机资源的问题。
由于源映射处于活动状态并且给我的计算机带来了很大的负载。我使用以下命令禁用它以 运行 测试:
ng test --source-map=false
这也很重要。如果您的应用程序太大。要 运行 测试,在您正在编写测试的 .spec.ts 文件中,在 describe 之前使用 f 以仅关注此测试文件。
fdescribe('my-test', () => {....}
我正在尝试使用 jasmine 3.2.0 和 karma 测试我的项目 angular 8.3.26,但它向我显示此错误:
Chrome 87.0.4280 (Windows 10.0.0) ERROR
DisconnectedClient disconnected from CONNECTED state (ping timeout)
和
Chrome 87.0.4280 (Windows 10.0.0): Executed 0 of null (skipped 229) ERROR (34.875 secs / 0 secs)
karma.conf.js
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/my-pro'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
captureTimeout: 60000, // it was already there
browserDisconnectTolerance : 1,
browserNoActivityTimeout: 60000,
browserDisconnectTimeout: 60000
});
};
查看了Whosebug中的解决方案,但问题并没有解决,
你有解决这个问题的意见吗?
这是我的计算机资源的问题。 由于源映射处于活动状态并且给我的计算机带来了很大的负载。我使用以下命令禁用它以 运行 测试:
ng test --source-map=false
这也很重要。如果您的应用程序太大。要 运行 测试,在您正在编写测试的 .spec.ts 文件中,在 describe 之前使用 f 以仅关注此测试文件。
fdescribe('my-test', () => {....}