(code)
| 104 | }); |
| 105 | |
| 106 | const exitHandler = async (code) => { |
| 107 | if (code === SKIPPED_TEST_CLOSE_CODE) { |
| 108 | console.log(`${prefix}${colors.grey('Test skipped')}`); |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | if (code !== 0) { |
| 113 | for (const line of deferredOnSuccess) console.log(`${prefix}${line}`); |
| 114 | } |
| 115 | |
| 116 | const took = (Date.now() - now) / 1000; |
| 117 | const status = code === 0 ? 'success' : 'failure'; |
| 118 | const color = code === 0 ? 'green' : 'red'; |
| 119 | console.log( |
| 120 | `${colors.yellow(`[${dir.name}] `)}${colors[color]( |
| 121 | `Test finished with status: ${status} `, |
| 122 | )}${colors.grey(`[took ${took}s]`)}`, |
| 123 | ); |
| 124 | |
| 125 | if (['MEMORY', 'LOCAL'].includes(process.env.STORAGE_IMPLEMENTATION)) { |
| 126 | await clearStorage(`${basePath}/${dir.name}`); |
| 127 | } |
| 128 | |
| 129 | if (process.env.STORAGE_IMPLEMENTATION === 'PLATFORM') { |
| 130 | await clearPackages(`${basePath}/${dir.name}`); |
| 131 | } |
| 132 | |
| 133 | if (status === 'failure') failure = true; |
| 134 | }; |
| 135 | |
| 136 | const { promise: waitForExit, resolve: markTestDone } = Promise.withResolvers(); |
| 137 |
no test coverage detected
searching dependent graphs…