-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome always close when karma finish run test #2991
Comments
Try running with DEBUG |
already try it on project but launcher keep closing after karma finish. I think singleRun: false not working on angular starter this is my version i use |
The purpose of DEBUG is to look in the log for the reason karma-runner exits. You could try installing 2.0.2 and jasmine 3.0. |
I'm seeing the same problem on version 2.0.2. I upgraded this morning (also to angular 6) and though the window was staying open this morning, it now closes immediately after the test, no matter what the autoWatch and singleRun settings are in karma.conf.ts. DEBUG log:
karma.conf.ts: 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'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_DEBUG,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
}; Interestingly, the second line in the log is Would love to know how to fix this. Thanks! |
please add a line like console.log(`config.singleRun ${config.singleRun}`, config); right after the config is parsed: |
Thanks for the feedback! As requested, see the output below. A couple of things:
thanks! |
Confirmed. This is an angular 6.0.0 bug. Sorry for bothering you. workaround is run with |
thanks for information for all |
Expected behaviour
I want chrome browser still open and show result jasmine test
Actual behaviour
Browser always close when karma test run finish
Environment Details
I'm using starter pack on angular. Karma Version on package.json is ~1.7.1
My Config:
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'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
Anyone having same problem or issue, can inform me
The text was updated successfully, but these errors were encountered: