update to latest standards
This commit is contained in:
committed by
Phil Kunz
parent
8be85e1b35
commit
03614fe2ef
36
ts/tapbundle.classes.taptools.ts
Normal file
36
ts/tapbundle.classes.taptools.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as plugins from './tapbundle.plugins'
|
||||
import { TapTest } from './tapbundle.classes.taptest'
|
||||
|
||||
export class TapTools {
|
||||
|
||||
/**
|
||||
* the referenced TapTest
|
||||
*/
|
||||
private _tapTest: TapTest
|
||||
|
||||
constructor(TapTestArg) {
|
||||
this._tapTest = TapTestArg
|
||||
}
|
||||
|
||||
/**
|
||||
* allow failure
|
||||
*/
|
||||
allowFailure() {
|
||||
this._tapTest.failureAllowed = true
|
||||
}
|
||||
|
||||
/**
|
||||
* async/await delay method
|
||||
*/
|
||||
async delayFor(timeMilliArg) {
|
||||
await plugins.smartdelay.delayFor(timeMilliArg)
|
||||
}
|
||||
|
||||
async timeout (timeMilliArg: number) {
|
||||
await plugins.smartdelay.delayFor(timeMilliArg)
|
||||
if (this._tapTest.status === 'pending') {
|
||||
this._tapTest.status = 'timeout'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user