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
c3fd0ed5
Commit
c3fd0ed5
authored
Jul 24, 2017
by
Arunoda Susiripala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test cases.
parent
1da00949
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
index.test.js
test/integration/ondemand/test/index.test.js
+8
-12
No files found.
test/integration/ondemand/test/index.test.js
View file @
c3fd0ed5
...
...
@@ -2,28 +2,24 @@
import
{
join
,
resolve
}
from
'path'
import
{
existsSync
}
from
'fs'
import
{
nextServer
,
renderViaHTTP
,
startApp
,
stopApp
,
findPort
,
launchApp
,
killApp
,
waitFor
}
from
'next-test-utils'
const
context
=
{}
context
.
app
=
nextServer
({
dir
:
join
(
__dirname
,
'../'
),
dev
:
true
,
quiet
:
true
})
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
40000
describe
(
'On Demand Entries'
,
()
=>
{
it
(
'should pass'
,
()
=>
{})
beforeAll
(
async
()
=>
{
context
.
server
=
await
startApp
(
context
.
app
)
context
.
appPort
=
context
.
server
.
address
().
port
context
.
appPort
=
await
findPort
(
)
context
.
server
=
await
launchApp
(
join
(
__dirname
,
'../'
),
context
.
appPort
)
})
afterAll
(()
=>
stop
App
(
context
.
server
))
afterAll
(()
=>
kill
App
(
context
.
server
))
it
(
'should compile pages for SSR'
,
async
()
=>
{
const
pageContent
=
await
renderViaHTTP
(
context
.
appPort
,
'/'
)
...
...
@@ -36,7 +32,7 @@ describe('On Demand Entries', () => {
})
it
(
'should dispose inactive pages'
,
async
()
=>
{
await
renderViaHTTP
(
context
.
appPort
,
'/_next/-/page
s
/about'
)
await
renderViaHTTP
(
context
.
appPort
,
'/_next/-/page/about'
)
const
aboutPagePath
=
resolve
(
__dirname
,
'../.next/bundles/pages/about.js'
)
expect
(
existsSync
(
aboutPagePath
)).
toBeTruthy
()
...
...
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