Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update format and add test
  • Loading branch information
ijjk committed Jan 16, 2023
commit c01c8bc0ab75a5ecee9e264761e9afbdadbd2fdb
2 changes: 1 addition & 1 deletion packages/next/src/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ server.listen(currentPort, (err) => {
console.log(
'Listening on port',
currentPort,
'url:', hostname + ':' + currentPort
'url: http://' hostname + ':' + currentPort
)
})`
)
Expand Down
12 changes: 12 additions & 0 deletions test/production/standalone-mode/response-cache/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('minimal-mode-response-cache', () => {
let next: NextInstance
let server
let appPort
let output = ''

beforeAll(async () => {
// test build against environment with next support
Expand Down Expand Up @@ -64,6 +65,12 @@ describe('minimal-mode-response-cache', () => {
undefined,
{
cwd: next.testDir,
onStdout(msg) {
output += msg
},
onStderr(msg) {
output += msg
},
}
)
})
Expand All @@ -72,6 +79,11 @@ describe('minimal-mode-response-cache', () => {
if (server) await killApp(server)
})

it('should have correct "Listening on" log', async () => {
expect(output).toContain(`Listening on port`)
expect(output).toContain(`url: http://localhost:${appPort}`)
})

it('should have correct responses', async () => {
const html = await renderViaHTTP(appPort, '/')
expect(html.length).toBeTruthy()
Expand Down