8000 gemini/lib/cli/test.js at v0.12.6 · gemini-testing/gemini · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Latest commit

 

History

History
39 lines (36 loc) · 1.12 KB

test.js

File metadata and controls

39 lines (36 loc) · 1.12 KB
'use strict';
var q = require('q'),
common = require('./common'),
Gemini = require('../gemini');
module.exports = function() {
this.title('Compare current state with previous')
.helpful()
.apply(common.common)
.opt()
.name('reporters')
.long('reporter')
.arr()
.def('flat')
.end()
.act(function(opts, args) {
return q
.fcall(function() {
return new Gemini(opts.configFile, opts);
})
.then(function(gemini) {
return gemini.test(args.testFiles, {
reporters: opts.reporters,
grep: opts.grep,
browsers: opts.browsers
});
})
.then(function(stats) {
if (stats.failed > 0 || stats.errored > 0) {
return 2;
}
return 0;
})
.then(common.exitCoa)
.fail(common.handleErrors);
});
};
0