Messages written to console.log don't show up in the terminal
See original GitHub issueHi. I am using karma server to run my mocha unit tests for an angular app. The problem I am having is that messages that I write inside each it
to console.log
don’t show up in the terminal. They do show up, however, if I simply run mocha [unit_test_file_name].js
at command line. Am I missing something in the configuration? Here are my files:
// gulfile.js
karma = require('karma').server,
gulp.task('unit', function (done) {
karma.start({
configFile: __dirname + '/config/unit/karma-unit.conf.js',
singleRun: true
}, done);
});
// karma-unit-conf
module.exports = function(config) {
config.set({
basePath: '../../',
autoWatch: false,
frameworks: ['mocha', 'chai', 'sinon-chai', 'chai-as-promised'],
// frameworks: ['mocha'],
browsers: ['PhantomJS'],
files: [
'bower_components/angular/angular.js',
'bower_components/lodash/dist/lodash.js',
'app/**/*.coffee'
],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-script-launcher',
'karma-mocha',
'karma-chai-plugins',
'karma-coffee-preprocessor'
],
preprocessors: {
'**/*.coffee': ['coffee']
},
coffeePreprocessor: {
options: {
bare: true,
sourceMap: false
},
transformPath: function(path) {
return path.replace(/\.coffee$/, '.js');
}
},
logLevel: config.LOG_DEBUG,
client: {
mocha: {
bail: true
}
}
});
};
Thank you!
Issue Analytics
- State:
- Created 9 years ago
- Comments:33 (5 by maintainers)
Top Results From Across the Web
Console.log messages do not appear in VSCode terminal ...
log command appears. I've tried changing the default terminal for VSCode to cmd.exe instead of powershell but had the same results.
Read more >Console app not showing info and debug logs
Using Terminal, with the command, all message types are visible in the Terminal output: -. sudo log stream --level debug. I've tried running...
Read more >How do I disable messages or logging from printing on the ...
You can use the command sudo dmesg -n 1. to suppress all messages from the kernel (and its drivers) except panic messages from...
Read more >JavaScript console.log() Method - W3Schools
The log() method writes (logs) a message to the console. The log() method is useful for testing purposes. Note. When testing console methods,...
Read more >JavaScript Console.log() Example – How to Print to the ...
Just open the console, Ctrl+Shift+K or F12 , and in the top right you will see a button that says "Switch to multi-line...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@demisx hi!
Put
captureConsole
to propertyclient
in karma.conf.js:This problem relate to Karma and we have issue. Thanks
As of
v1.5.0
, modifications on the client key do not solve this issue. For example: 👎Modifying
browserConsoleLogOptions
: 👍 worked.See issues: #2582 & #2228 for more info.