feat(pretask): introduce new pretask functionality for setting up testing environment
This commit is contained in:
19
ts/tapbundle.classes.pretask.ts
Normal file
19
ts/tapbundle.classes.pretask.ts
Normal 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user