(description, testFn)
| 50 | } |
| 51 | |
| 52 | async function test(description, testFn) { |
| 53 | totalTests++; |
| 54 | try { |
| 55 | const result = await testFn(); |
| 56 | if (result === true || result === undefined) { |
| 57 | log(`✅ ${description}`, 'success'); |
| 58 | passedTests++; |
| 59 | } else { |
| 60 | log(`❌ ${description}: ${result}`, 'error'); |
| 61 | failedTests++; |
| 62 | } |
| 63 | } catch (error) { |
| 64 | log(`❌ ${description}: ${error.message}`, 'error'); |
| 65 | failedTests++; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | function loadSchema(schemaPath) { |
| 70 | try { |