-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.js
36 lines (30 loc) · 925 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict';
var Runner = require('./lib');
function create(emitter, config, context, done) {
var runner = new Runner(emitter, config);
runner.loadExtensions(context.extensionPaths, function (err) {
done(err, runner);
});
}
module.exports = {
// Strider runner requires:
config: {
pty: Boolean,
useCache: Boolean,
},
// function(emitter, opts, cb) -> creates a 'runner' bound to the emitter
create: create,
// Must handle events:
// --> 'job.new' (job, ...
// --> 'job.cancel' jobid
// Events it is expected to emit
// <-- 'browser.update' eventname, data
// <-- 'job.queued' jobid, time
// <-- 'job.done' { id: jobid, commands: [...], times: {...}, test_status: int, deploy_status: int }
// Backwards compat: TODO remove
// --> queue.new_job
// <-- queue.job_update
// <-- queue.job_complete
// We expose these for other modules / unit testing
Runner: Runner,
};