mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
dca609e3f9
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
24 lines
749 B
JavaScript
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);
|