【发布时间】:2019-01-18 23:47:00
【问题描述】:
我有以下基于this 的karma.config.js
module.exports = function (config) {
config.set({
basePath: '',
files: ['**/*spec.ts'],
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
我不明白为什么报告说执行了 0 次测试。我确定我的 src 文件夹中有一些文件扩展名为 spec.ts。
Chrome 68.0.3440 (Windows 10.0.0):执行 0 of 0 错误(0.079 秒/0 秒)
有人知道可能是什么问题吗?
【问题讨论】:
标签: angular typescript karma-runner