Skip to content
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

Dramatically decrease unit test output noise when running from CLI #7207

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Specs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = function(config) {
frameworks : ['jasmine', 'requirejs', 'detectBrowsers'],

client: {
captureConsole: false,
jasmine: {
random: false
}
Expand Down Expand Up @@ -55,7 +56,7 @@ module.exports = function(config) {

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

// enable / disable watching file and executing tests whenever any file changes
autoWatch : false,
Expand Down
8 changes: 6 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var gulpRename = require('gulp-rename');
var gulpReplace = require('gulp-replace');
var Promise = require('bluebird');
var requirejs = require('requirejs');
var Karma = require('karma').Server;
var Karma = require('karma');
var yargs = require('yargs');
var AWS = require('aws-sdk');
var mime = require('mime');
Expand All @@ -45,6 +45,8 @@ var taskName = process.argv[2];
var noDevelopmentGallery = taskName === 'release' || taskName === 'makeZipFile';
var minifyShaders = taskName === 'minify' || taskName === 'minifyRelease' || taskName === 'release' || taskName === 'makeZipFile' || taskName === 'buildApps';

var verbose = yargs.argv.verbose;

var concurrency = yargs.argv.concurrency;
if (!concurrency) {
concurrency = os.cpus().length;
Expand Down Expand Up @@ -623,7 +625,7 @@ gulp.task('test', function(done) {
files.push({pattern : 'Build/**', included : false});
}

var karma = new Karma({
var karma = new Karma.Server({
configFile: karmaConfigFile,
browsers: browsers,
specReporter: {
Expand All @@ -635,8 +637,10 @@ gulp.task('test', function(done) {
detectBrowsers: {
enabled: enableAllBrowsers
},
logLevel: verbose ? Karma.constants.LOG_INFO : Karma.constants.LOG_ERROR,
files: files,
client: {
captureConsole: verbose,
args: [includeCategory, excludeCategory, webglValidation, webglStub, release]
}
}, function(e) {
Expand Down