build: Lower default Karma logLevel during local development
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 24 Sep 2019 16:46:53 +0000 (17:46 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 24 Sep 2019 16:46:53 +0000 (17:46 +0100)
Follows-up fa63a70ae90 which enabled this for CI to investigate
a Jenkins-specific issue, but it makes for a very noisy and visually
unpleasant local experience because these Karma lines interweave
with the structural output from the qunit/karma reporter.

With this change applied, the local experience from 'npm run qunit'
has clean output again like so:

```

  mediawiki.storage
    ✔ set/get(Object) with storage support
    ✔ set/get(Object) with storage methods disabled
    ✔ set/get(Object) with storage object disabled
  mediawiki.template
    ✔ add
    ✔ compile
    ✔ get

Finished in 13 secs

SUMMARY:
✔ 440 tests completed
```

Change-Id: I21555468ed30ca3a2220eba1d8a78cc140a13399

Gruntfile.js

index 8115ea2..9615330 100644 (file)
@@ -117,7 +117,7 @@ module.exports = function ( grunt ) {
                                        included: true,
                                        served: false
                                } ],
-                               logLevel: 'DEBUG',
+                               logLevel: ( process.env.ZUUL_PROJECT ? 'DEBUG' : 'INFO' ),
                                frameworks: [ 'qunit' ],
                                reporters: [ 'mocha' ],
                                singleRun: true,