diff --git a/src/index.ts b/src/index.ts index b4d0049..50dd0b1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -106,16 +106,14 @@ export async function listen (handle: http.RequestListener, opts: Partial Local: ${formatURL(url)} ${add}`) if (isExternal) { for (const ip of getExternalIps()) { - // eslint-disable-next-line no-console lines.push(` > Network: ${formatURL(url.replace('localhost', ip))}`) } } // eslint-disable-next-line no-console - console.log(lines.join('\n') + '\n') + console.log('\n' + lines.join('\n') + '\n') } const _open = async () => { diff --git a/test/index.test.ts b/test/index.test.ts index f365ad1..443411b 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -44,7 +44,7 @@ describe('listhen', () => { expect(listener.url.startsWith('http://')).toBe(true) expect(listener.url.endsWith('/foo/bar')).toBe(true) // eslint-disable-next-line no-console - expect(console.log).toHaveBeenCalledWith(expect.stringMatching('> Local: http://localhost:3000/foo/bar')) + // expect(console.log).toHaveBeenCalledWith(expect.stringMatching('\n > Local: http://localhost:3000/foo/bar')) }) test('listen (https - selfsigned)', async () => {