()
| 205 | } |
| 206 | |
| 207 | async function ctrlCTest() { |
| 208 | console.log('Testing Ctrl+C'); |
| 209 | const output = await runAndWait([ |
| 210 | 'await new Promise(() => {})', |
| 211 | { ctrl: true, name: 'c' }, |
| 212 | ]); |
| 213 | assert.deepStrictEqual(output.slice(0, 3), [ |
| 214 | 'await new Promise(() => {})\r', |
| 215 | 'Uncaught:', |
| 216 | '[Error [ERR_SCRIPT_EXECUTION_INTERRUPTED]: ' + |
| 217 | 'Script execution was interrupted by `SIGINT`] {', |
| 218 | ]); |
| 219 | assert.deepStrictEqual(output.slice(-2), [ |
| 220 | '}', |
| 221 | PROMPT, |
| 222 | ]); |
| 223 | } |
| 224 | |
| 225 | async function main() { |
| 226 | await ordinaryTests(); |
no test coverage detected