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