(description, testFn)
| 34 | let total = 0; |
| 35 | |
| 36 | function test(description, testFn) { |
| 37 | total++; |
| 38 | log('blue', `\nTest: ${description}`); |
| 39 | try { |
| 40 | if (testFn()) { |
| 41 | passed++; |
| 42 | } |
| 43 | } catch (error) { |
| 44 | log('red', `✗ ${description} - Error: ${error.message}`); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | log('yellow', '=== libCacheSim Node.js Bindings Test Suite ===\n'); |
| 49 |