@@ -43,12 +43,12 @@ describe('Switchable runtime', () => {
43
43
app : new FileRef ( join ( __dirname , './app' ) ) ,
44
44
pages : new FileRef ( join ( __dirname , './pages' ) ) ,
45
45
utils : new FileRef ( join ( __dirname , './utils' ) ) ,
46
+ 'next.config.js' : new FileRef ( join ( __dirname , './next.config.js' ) ) ,
46
47
} ,
47
48
dependencies : {
48
49
react : 'experimental' ,
49
50
'react-dom' : 'experimental' ,
50
51
} ,
51
- nextConfig : new FileRef ( join ( __dirname , './next.config.js' ) ) ,
52
52
} )
53
53
context = {
54
54
appPort : next . url ,
@@ -120,24 +120,26 @@ describe('Switchable runtime', () => {
120
120
const text = await response . text ( )
121
121
expect ( text ) . toMatch ( / H e l l o f r o m .+ \/ a p i \/ h e l l o / )
122
122
123
- const manifest = await readJson (
124
- join ( context . appDir , '.next/server/middleware-manifest.json' )
125
- )
126
- expect ( manifest ) . toMatchObject ( {
127
- functions : {
128
- '/api/hello' : {
129
- env : [ ] ,
130
- files : [
131
- 'server/edge-runtime-webpack.js' ,
132
- 'server/pages/api/hello.js' ,
133
- ] ,
134
- name : 'pages/api/hello' ,
135
- page : '/api/hello' ,
136
- regexp : '^/api/hello$' ,
137
- wasm : [ ] ,
123
+ if ( ! ( global as any ) . isNextDeploy ) {
124
+ const manifest = await readJson (
125
+ join ( context . appDir , '.next/server/middleware-manifest.json' )
126
+ )
127
+ expect ( manifest ) . toMatchObject ( {
128
+ functions : {
129
+ '/api/hello' : {
130
+ env : [ ] ,
131
+ files : [
132
+ 'server/edge-runtime-webpack.js' ,
133
+ 'server/pages/api/hello.js' ,
134
+ ] ,
135
+ name : 'pages/api/hello' ,
136
+ page : '/api/hello' ,
137
+ regexp : '^/api/hello$' ,
138
+ wasm : [ ] ,
139
+ } ,
138
140
} ,
139
- } ,
140
- } )
141
+ } )
142
+ }
141
143
} )
142
144
} )
143
145
} else {
@@ -238,24 +240,26 @@ describe('Switchable runtime', () => {
238
240
const text = await response . text ( )
239
241
expect ( text ) . toMatch ( / H e l l o f r o m .+ \/ a p i \/ h e l l o / )
240
242
241
- const manifest = await readJson (
242
- join ( context . appDir , '.next/server/middleware-manifest.json' )
243
- )
244
- expect ( manifest ) . toMatchObject ( {
245
- functions : {
246
- '/api/hello' : {
247
- env : [ ] ,
248
- files : [
249
- 'server/edge-runtime-webpack.js' ,
250
- 'server/pages/api/hello.js' ,
251
- ] ,
252
- name : 'pages/api/hello' ,
253
- page : '/api/hello' ,
254
- regexp : '^/api/hello$' ,
255
- wasm : [ ] ,
243
+ if ( ! ( global as any ) . isNextDeploy ) {
244
+ const manifest = await readJson (
245
+ join ( context . appDir , '.next/server/middleware-manifest.json' )
246
+ )
247
+ expect ( manifest ) . toMatchObject ( {
248
+ functions : {
249
+ '/api/hello' : {
250
+ env : [ ] ,
251
+ files : [
252
+ 'server/edge-runtime-webpack.js' ,
253
+ 'server/pages/api/hello.js' ,
254
+ ] ,
255
+ name : 'pages/api/hello' ,
256
+ page : '/api/hello' ,
257
+ regexp : '^/api/hello$' ,
258
+ wasm : [ ] ,
259
+ } ,
256
260
} ,
257
- } ,
258
- } )
261
+ } )
262
+ }
259
263
} )
260
264
261
265
it . skip ( 'should display correct tree view with page types in terminal' , async ( ) => {
0 commit comments