0
我想从IntelliJ调试我的angular2 karma测试无济于事。我甚至尝试禁用代码覆盖率。从我的IDE调试angular2/karma测试:断点永远不会被打
我的测试中的断点从未被击中。
这是我的因缘配置:
// 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-remap-istanbul'),
require('@angular/cli/plugins/karma')
],
customLaunchers: {
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
files: [
{pattern: './src/test.ts', watched: false}
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: { 'text/x-typescript': ['ts','tsx'] },
remapIstanbulReporter: {
reports: {
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
},
angularCli: {
config: './angular-cli.json',
environment: 'dev'
},
reporters: ['progress', 'karma-remap-istanbul'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
该应用程序是由角CLI(其本身依赖于的WebPack)构建的。
有人能请指教吗?
谢谢。只要我回到我的电脑并相应地回复,我会尝试一下您建议的解决方案。请耐心等待... – balteo
非常感谢!这节省了我的一天! – balteo