8000 gemini/lib/cli/gather.js at v0.12.4 · 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
31 lines (28 loc) · 953 Bytes

gather.js

File metadata and controls

31 lines (28 loc) · 953 Bytes
'use strict';
var q = require('q'),
common = require('./common'),
Gemini = require('../gemini'),
flatReporter = require('../reporters/flat');
module.exports = function() {
this.title('Gather screenshots of all states')
.helpful()
.apply(common.common)
.act(function(opts, args) {
return q
.fcall(function() {
return new Gemini(opts.configFile, opts);
})
.then(function(gemini) {
return gemini.gather(args.testFiles, {
reporters: [flatReporter],
grep: opts.grep,
browsers: opts.browsers
});
})
.then(function(stats) {
return stats.errored > 0? 2 : 0;
})
.then(common.exitCoa)
.fail(common.handleErrors);
});
};
0