File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
test/production/standalone-mode/response-cache Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1789,7 +1789,7 @@ server.listen(currentPort, (err) => {
1789
1789
console.log(
1790
1790
'Listening on port',
1791
1791
currentPort,
1792
- 'url: http://localhost :' + currentPort
1792
+ 'url: http://' + hostname + ' :' + currentPort
1793
1793
)
1794
1794
})`
1795
1795
)
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ describe('minimal-mode-response-cache', () => {
15
15
let next : NextInstance
16
16
let server
17
17
let appPort
18
+ let output = ''
18
19
19
20
beforeAll ( async ( ) => {
20
21
// test build against environment with next support
@@ -59,11 +60,18 @@ describe('minimal-mode-response-cache', () => {
59
60
/ L i s t e n i n g o n / ,
60
61
{
61
62
...process . env ,
63
+ HOSTNAME : '' ,
62
64
PORT : appPort ,
63
65
} ,
64
66
undefined ,
65
67
{
66
68
cwd : next . testDir ,
69
+ onStdout ( msg ) {
70
+ output += msg
71
+ } ,
72
+ onStderr ( msg ) {
73
+ output += msg
74
+ } ,
67
75
}
68
76
)
69
77
} )
@@ -72,6 +80,11 @@ describe('minimal-mode-response-cache', () => {
72
80
if ( server ) await killApp ( server )
73
81
} )
74
82
83
+ it ( 'should have correct "Listening on" log' , async ( ) => {
84
+ expect ( output ) . toContain ( `Listening on port` )
85
+ expect ( output ) . toContain ( `url: http://localhost:${ appPort } ` )
86
+ } )
87
+
75
88
it ( 'should have correct responses' , async ( ) => {
76
89
const html = await renderViaHTTP ( appPort , '/' )
77
90
expect ( html . length ) . toBeTruthy ( )
You can’t perform that action at this time.
0 commit comments