karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

Looks like logLevel = OFF isn't working #102

Open message opened 10 years ago

message commented 10 years ago

I assumed that logLevel = "OFF" would not output console.error() messages to terminal.

Running "karma:daemon" (karma) task
Verifying property karma.daemon exists in config...OK
File: [no files]
Options: background=false, basePath="/Users/message/www/webapp", singleRun=false, captureTimeout=7000, autoWatch, logLevel="OFF", reporters=["dots","coverage"], browsers=["PhantomJS"], frameworks=["jasmine"], plugins=["karma-jasmine","karma-phantomjs-launcher","karma-chrome-launcher","karma-safari-launcher","karma-coverage"], preprocessors={"app/**/*.js":"coverage"}, coverageReporter={"type":"lcov","dir":"test/coverage"}, files=["vendor/bower/requirejs/require.js","test/runner.js",{"pattern":"app/**/*.*","included":false},{"pattern":"test/jasmine/**/*.spec.js","included":false},{"pattern":"vendor/**/*.js","included":false}]
.....
ERROR: 'Wrong decimal number {number="null", type="object"} provided, during conversion from decimal to american'
.
ERROR: 'Wrong decimal number {number="-25", type="number"} provided, during conversion from decimal to american'
.
ERROR: 'Wrong decimal number {number="test", type="string"} provided, during conversion from decimal to american'
.
ERROR: 'Wrong decimal number {number="[object Object]", type="object"} provided, during conversion from decimal to american'
.......................
PhantomJS 1.9.7 (Mac OS X): Executed 31 of 31 SUCCESS (0.008 secs / 0.004 secs)

What am i doing wrong?

beckyconning commented 10 years ago

Hi I'm having the same issue. grunt-karma output is too noisy for our development team.

beckyconning commented 10 years ago

@message You might find that adding client: { captureConsole: false } to your karma grunt config might do what you'd like logLevel: 'OFF' to do? From your example though I think we might have had different issues.

e.g.

karma: {
    cucumber: {
        singleRun: false,
        port: 9877,
        runnerPort: 9101,
        autoWatch: true,
        captureTimeout: 60000,
        browsers: ['Chrome'],
        exclude: ['**/*.md', 'config/**'],
        proxies: {
            '/base/config/': 'http://localhost:9870/'
        },
        reporters: ['story'],
        configFile: 'features/karma.conf.js',
        client: {
            captureConsole: false
        }
    }
}