feat(pretask): introduce new pretask functionality for setting up testing environment

This commit is contained in:
2019-11-16 23:40:36 +01:00
parent bdcc94e723
commit 427878763e
4 changed files with 45 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
import * as plugins from './tapbundle.plugins';
import { TapTools } from './tapbundle.classes.taptools';
export interface IPreTaskFunction {
(tapTools?: TapTools): Promise<any>;
}
export class PreTask {
public preTaskFunction: IPreTaskFunction;
constructor(preTaskFunctionArg: IPreTaskFunction) {
this.preTaskFunction = preTaskFunctionArg;
}
public async run () {
await this.preTaskFunction(new TapTools(null));
}
}