Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
fd3a2af4
Unverified
Commit
fd3a2af4
authored
Jul 07, 2022
by
JJ Kasper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests for deploy
parent
e9ffd9be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
35 deletions
+39
-35
index.test.ts
test/e2e/switchable-runtime/index.test.ts
+39
-35
No files found.
test/e2e/switchable-runtime/index.test.ts
View file @
fd3a2af4
...
@@ -43,12 +43,12 @@ describe('Switchable runtime', () => {
...
@@ -43,12 +43,12 @@ describe('Switchable runtime', () => {
app
:
new
FileRef
(
join
(
__dirname
,
'./app'
)),
app
:
new
FileRef
(
join
(
__dirname
,
'./app'
)),
pages
:
new
FileRef
(
join
(
__dirname
,
'./pages'
)),
pages
:
new
FileRef
(
join
(
__dirname
,
'./pages'
)),
utils
:
new
FileRef
(
join
(
__dirname
,
'./utils'
)),
utils
:
new
FileRef
(
join
(
__dirname
,
'./utils'
)),
'next.config.js'
:
new
FileRef
(
join
(
__dirname
,
'./next.config.js'
)),
},
},
dependencies
:
{
dependencies
:
{
react
:
'experimental'
,
react
:
'experimental'
,
'react-dom'
:
'experimental'
,
'react-dom'
:
'experimental'
,
},
},
nextConfig
:
new
FileRef
(
join
(
__dirname
,
'./next.config.js'
)),
})
})
context
=
{
context
=
{
appPort
:
next
.
url
,
appPort
:
next
.
url
,
...
@@ -120,24 +120,26 @@ describe('Switchable runtime', () => {
...
@@ -120,24 +120,26 @@ describe('Switchable runtime', () => {
const
text
=
await
response
.
text
()
const
text
=
await
response
.
text
()
expect
(
text
).
toMatch
(
/Hello from .+
\/
api
\/
hello/
)
expect
(
text
).
toMatch
(
/Hello from .+
\/
api
\/
hello/
)
const
manifest
=
await
readJson
(
if
(
!
(
global
as
any
).
isNextDeploy
)
{
join
(
context
.
appDir
,
'.next/server/middleware-manifest.json'
)
const
manifest
=
await
readJson
(
)
join
(
context
.
appDir
,
'.next/server/middleware-manifest.json'
)
expect
(
manifest
).
toMatchObject
({
)
functions
:
{
expect
(
manifest
).
toMatchObject
({
'/api/hello'
:
{
functions
:
{
env
:
[],
'/api/hello'
:
{
files
:
[
env
:
[],
'server/edge-runtime-webpack.js'
,
files
:
[
'server/pages/api/hello.js'
,
'server/edge-runtime-webpack.js'
,
],
'server/pages/api/hello.js'
,
name
:
'pages/api/hello'
,
],
page
:
'/api/hello'
,
name
:
'pages/api/hello'
,
regexp
:
'^/api/hello$'
,
page
:
'/api/hello'
,
wasm
:
[],
regexp
:
'^/api/hello$'
,
wasm
:
[],
},
},
},
}
,
}
)
}
)
}
})
})
})
})
}
else
{
}
else
{
...
@@ -238,24 +240,26 @@ describe('Switchable runtime', () => {
...
@@ -238,24 +240,26 @@ describe('Switchable runtime', () => {
const
text
=
await
response
.
text
()
const
text
=
await
response
.
text
()
expect
(
text
).
toMatch
(
/Hello from .+
\/
api
\/
hello/
)
expect
(
text
).
toMatch
(
/Hello from .+
\/
api
\/
hello/
)
const
manifest
=
await
readJson
(
if
(
!
(
global
as
any
).
isNextDeploy
)
{
join
(
context
.
appDir
,
'.next/server/middleware-manifest.json'
)
const
manifest
=
await
readJson
(
)
join
(
context
.
appDir
,
'.next/server/middleware-manifest.json'
)
expect
(
manifest
).
toMatchObject
({
)
functions
:
{
expect
(
manifest
).
toMatchObject
({
'/api/hello'
:
{
functions
:
{
env
:
[],
'/api/hello'
:
{
files
:
[
env
:
[],
'server/edge-runtime-webpack.js'
,
files
:
[
'server/pages/api/hello.js'
,
'server/edge-runtime-webpack.js'
,
],
'server/pages/api/hello.js'
,
name
:
'pages/api/hello'
,
],
page
:
'/api/hello'
,
name
:
'pages/api/hello'
,
regexp
:
'^/api/hello$'
,
page
:
'/api/hello'
,
wasm
:
[],
regexp
:
'^/api/hello$'
,
wasm
:
[],
},
},
},
}
,
}
)
}
)
}
})
})
it
.
skip
(
'should display correct tree view with page types in terminal'
,
async
()
=>
{
it
.
skip
(
'should display correct tree view with page types in terminal'
,
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment