fix(core): update
This commit is contained in:
		| @@ -8,10 +8,10 @@ export class Tap <T> { | |||||||
|    * tests marked with tap.skip.test() are never executed |    * tests marked with tap.skip.test() are never executed | ||||||
|    */ |    */ | ||||||
|   public skip = { |   public skip = { | ||||||
|     test: (descriptionArg: string, functionArg: ITestFunction) => { |     test: (descriptionArg: string, functionArg: ITestFunction<T>) => { | ||||||
|       console.log(`skipped test: ${descriptionArg}`); |       console.log(`skipped test: ${descriptionArg}`); | ||||||
|     }, |     }, | ||||||
|     testParallel: (descriptionArg: string, functionArg: ITestFunction) => { |     testParallel: (descriptionArg: string, functionArg: ITestFunction<T>) => { | ||||||
|       console.log(`skipped test: ${descriptionArg}`); |       console.log(`skipped test: ${descriptionArg}`); | ||||||
|     }, |     }, | ||||||
|   }; |   }; | ||||||
| @@ -38,7 +38,7 @@ export class Tap <T> { | |||||||
|     testDescription: string, |     testDescription: string, | ||||||
|     testFunction: ITestFunction<T>, |     testFunction: ITestFunction<T>, | ||||||
|     modeArg: 'normal' | 'only' | 'skip' = 'normal' |     modeArg: 'normal' | 'only' | 'skip' = 'normal' | ||||||
|   ) { |   ): TapTest<T> { | ||||||
|     const localTest = new TapTest<T>({ |     const localTest = new TapTest<T>({ | ||||||
|       description: testDescription, |       description: testDescription, | ||||||
|       testFunction, |       testFunction, | ||||||
| @@ -61,7 +61,7 @@ export class Tap <T> { | |||||||
|    * @param testDescription - A description of what the test does |    * @param testDescription - A description of what the test does | ||||||
|    * @param testFunction - A Function that returns a Promise and resolves or rejects |    * @param testFunction - A Function that returns a Promise and resolves or rejects | ||||||
|    */ |    */ | ||||||
|   public testParallel(testDescription: string, testFunction: ITestFunction) { |   public testParallel(testDescription: string, testFunction: ITestFunction<T>) { | ||||||
|     this._tapTests.push( |     this._tapTests.push( | ||||||
|       new TapTest({ |       new TapTest({ | ||||||
|         description: testDescription, |         description: testDescription, | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ import { HrtMeasurement } from '@pushrocks/smarttime'; | |||||||
| // interfaces | // interfaces | ||||||
| export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout'; | export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout'; | ||||||
|  |  | ||||||
| export interface ITestFunction <T = unknown> { (tapTools?: TapTools): Promise<T> }; | export interface ITestFunction <T> { (tapTools?: TapTools): Promise<T> }; | ||||||
|  |  | ||||||
| export class TapTest <T = unknown> { | export class TapTest <T = unknown> { | ||||||
|   public description: string; |   public description: string; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user