0

I'm a beginner at Karma testing using Jasmine, and i'm having some problem to figure out why my the debug command does not show any output of my AngularJs app testing on the console.

Again, the console is the one who doesn't show any output, not the browser. I've seen other questions of people who thought that the browser was suppose to show some kind of output, I know it doesn't work that way.

Its like the test starts to run but it doesn't really stops. I'm guessing is something with my karma.conf, probably the 'basePath' or the 'files'.

This is my karma.conf file:

// Karma configuration
// Generated on Sun Apr 03 2016 15:29:19 GMT-0300 (Hora Padrão da Bahia)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
    '../../tests/**/*.js',
    '../../src/**/*.js'
],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}

This is how my console looks like

enter image description here

when I click the 'debug' button in the browser instance that Karma opens on 'karma start'. It stays like this and dosen't ever change nor show any output.

Can some one help me out with this?

1
  • Do you see output in the console if you use phantomJS and not Chrome ? Apr 4, 2016 at 15:12

1 Answer 1

0

Try adding this to your karma config loggers : [ { type: 'console' } ], Also check client.captureConsole Type: Boolean Default: true Description: Capture all console output and pipe it to the terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.