fix(core): update

This commit is contained in:
2024-04-18 20:47:25 +02:00
parent 3655b2f734
commit 928d9d0616
4 changed files with 456 additions and 1141 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tstest',
version: '1.0.88',
version: '1.0.89',
description: 'a test utility to run tests that match test/**/*.ts'
}

View File

@ -170,11 +170,14 @@ export class TsTest {
try {
// Dynamically import the test module
const testModule = await import(`/${bundleName}`);
if (testModule && testModule.runTestPromise) {
if (testModule && testModule.default && testModule.default instanceof Promise) {
// Execute the exported test function
await testModule.runTestPromise;
} else {
console.error('Test module does not export runTest function.');
console.error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
console.error('Test module does not export a default promise.');
console.error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
}
} catch (err) {
console.error(err);