(name, testFn)
| 19 | let testsFailed = 0; |
| 20 | |
| 21 | function runTest(name, testFn) { |
| 22 | process.stdout.write(`Testing ${name}... `); |
| 23 | try { |
| 24 | testFn(); |
| 25 | console.log(`${colors.green}✓${colors.reset}`); |
| 26 | testsPassed++; |
| 27 | } catch (error) { |
| 28 | console.log(`${colors.red}✗${colors.reset}`); |
| 29 | console.error(` Error: ${error.message}`); |
| 30 | testsFailed++; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | function execCommand(command, options = {}) { |
| 35 | return execSync(command, { |
no test coverage detected