mediawiki-extensions-Visual.../modules/parser/test/specs.js
Carl Fürstenberg dca609e3f9 Parsoid: move tests/parser to modules/parser/test
In preparation for the big extraction of Parsoid out of VisualEditor,
we'll start by moving the tests into the parsoid location.

Change-Id: I4a926ee4aad1490d4f769d44e91af80842b881f0
2012-07-25 02:29:25 +02:00

24 lines
749 B
JavaScript

// Code copied from http://elegantcode.com/2011/03/07/taking-baby-steps-with-node-js-bdd-style-unit-tests-with-jasmine-node-sprinkled-with-some-should/
// and suitably adapted for our purposes
var jasmine = require('jasmine-node');
Object.keys(jasmine).forEach(function ( key ) {
global[key] = jasmine[key];
});
var isVerbose = true;
var showColors = true;
process.argv.slice(2).forEach(function(arg){
switch(arg) {
case '--color': showColors = true; break;
case '--no-color': showColors = false; break;
case '--no-verbose': isVerbose = false; break;
}
});
jasmine.executeSpecsInFolder(__dirname + '/specs', function(runner, log){
process.exit(runner.results().failedCount);
}, isVerbose, showColors);