UNPKG

1.39 kBTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="q" />
3import { EventEmitter } from 'events';
4import * as q from 'q';
5import { Config } from './config';
6export interface RunResults {
7 taskId: number;
8 specs: Array<string>;
9 capabilities: any;
10 failedCount: number;
11 exitCode: number;
12 specResults: Array<any>;
13}
14/**
15 * A runner for running a specified task (capabilities + specs).
16 * The TaskRunner can either run the task from the current process (via
17 * './runner.js') or from a new process (via './runnerCli.js').
18 *
19 * @constructor
20 * @param {string} configFile Path of test configuration.
21 * @param {object} additionalConfig Additional configuration.
22 * @param {object} task Task to run.
23 * @param {boolean} runInFork Whether to run test in a forked process.
24 * @constructor
25 */
26export declare class TaskRunner extends EventEmitter {
27 private configFile;
28 private additionalConfig;
29 private task;
30 private runInFork;
31 constructor(configFile: string, additionalConfig: Config, task: any, runInFork: boolean);
32 /**
33 * Sends the run command.
34 * @return {q.Promise} A promise that will resolve when the task finishes
35 * running. The promise contains the following parameters representing the
36 * result of the run:
37 * taskId, specs, capabilities, failedCount, exitCode, specResults
38 */
39 run(): q.Promise<any>;
40}