()
| 342 | } |
| 343 | |
| 344 | public async getUrl(): Promise<string> { |
| 345 | return new Promise((resolve, reject) => { |
| 346 | if (!this.isListening) { |
| 347 | this.logger.error(MESSAGES.CALL_LISTEN_FIRST); |
| 348 | reject(MESSAGES.CALL_LISTEN_FIRST); |
| 349 | return; |
| 350 | } |
| 351 | const address = this.httpServer.address(); |
| 352 | resolve(this.formatAddress(address)); |
| 353 | }); |
| 354 | } |
| 355 | |
| 356 | private formatAddress(address: any): string { |
| 357 | if (isString(address)) { |
nothing calls this directly
no test coverage detected