fix(core): Refactored tstest class to enhance promise handling for test modules.
This commit is contained in:
		| @@ -173,6 +173,11 @@ export class TsTest { | ||||
|           if (testModule && testModule.default && testModule.default instanceof Promise) { | ||||
|             // Execute the exported test function | ||||
|             await testModule.default; | ||||
|           } else if (testModule && testModule.default && testModule.default.then === 'function') { | ||||
|             console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); | ||||
|             console.log('Test module default export is just promiselike: Something might be messing with your Promise implementation.'); | ||||
|             console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); | ||||
|             await testModule.default; | ||||
|           } else { | ||||
|             console.error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); | ||||
|             console.error('Test module does not export a default promise.'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user