(data: Buffer)
| 99 | }, timeoutMs) |
| 100 | |
| 101 | function onStdout(data: Buffer) { |
| 102 | const urlMatch = data.toString().match(/http:\/\/[^\s]+/) |
| 103 | if (urlMatch) { |
| 104 | clearTimeout(timeout) |
| 105 | process.stdout.off('data', onStdout) |
| 106 | process.off('error', onError) |
| 107 | process.off('exit', onExit) |
| 108 | resolve(urlMatch[0]) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | function onError(error: Error) { |
| 113 | clearTimeout(timeout) |
nothing calls this directly
no test coverage detected