(options = { stdio: 'inherit' })
| 11 | } |
| 12 | |
| 13 | help(options = { stdio: 'inherit' }) { |
| 14 | const { promise, resolve, reject } = Promise.withResolvers(); |
| 15 | const proc = spawn(this.#pathToServer, ['--help'], options); |
| 16 | proc.on('error', reject); |
| 17 | proc.on('exit', (code, signal) => { |
| 18 | if (code === 0) { |
| 19 | resolve(); |
| 20 | } else { |
| 21 | reject(new Error(`Process exited with code ${code} and signal ${signal}`)); |
| 22 | } |
| 23 | }); |
| 24 | return promise; |
| 25 | } |
| 26 | |
| 27 | run(address, port, keyFile, certFile, options = { stdio: 'inherit' }) { |
| 28 | const { promise, resolve, reject } = Promise.withResolvers(); |
no test coverage detected