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
cd333000
Unverified
Commit
cd333000
authored
Sep 20, 2024
by
Hendrik Liebau
Committed by
GitHub
Sep 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Await `killApp` in integration tests (#70292)
parent
948f1f1a
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
71 additions
and
71 deletions
+71
-71
index.test.js
test/integration/api-body-parser/test/index.test.js
+3
-3
index.test.js
...ntegration/config-experimental-warning/test/index.test.js
+2
-2
index.test.js
test/integration/config-mjs/test/index.test.js
+2
-2
index.test.js
test/integration/config/test/index.test.js
+2
-2
index.test.js
test/integration/custom-server/test/index.test.js
+2
-2
index.test.js
...ation/edge-runtime-configurable-guards/test/index.test.js
+2
-2
index.test.js
...ntegration/edge-runtime-response-error/test/index.test.js
+2
-2
index.test.js
test/integration/empty-project/test/index.test.js
+2
-2
index.test.js
test/integration/middleware-dev-update/test/index.test.js
+2
-2
static.test.ts
...tegration/next-image-legacy/base-path/test/static.test.ts
+4
-4
static.test.ts
...integration/next-image-legacy/default/test/static.test.ts
+2
-2
index.test.ts
.../integration/next-image-legacy/unicode/test/index.test.ts
+4
-4
static.test.ts
test/integration/next-image-new/app-dir/test/static.test.ts
+4
-4
static.test.js
.../integration/next-image-new/base-path/test/static.test.js
+4
-4
static.test.ts
test/integration/next-image-new/default/test/static.test.ts
+4
-4
index.test.ts
...loader-config-default-loader-with-file/test/index.test.ts
+8
-8
index.test.ts
...t-image-new/loader-config-edge-runtime/test/index.test.ts
+4
-4
index.test.ts
...tegration/next-image-new/loader-config/test/index.test.ts
+8
-8
index.test.ts
test/integration/next-image-new/unicode/test/index.test.ts
+4
-4
index.test.js
test/integration/ondemand/test/index.test.js
+2
-2
index.test.js
test/integration/plugin-mdx-rs/test/index.test.js
+4
-4
No files found.
test/integration/api-body-parser/test/index.test.js
View file @
cd333000
...
@@ -24,21 +24,21 @@ function runTests() {
...
@@ -24,21 +24,21 @@ function runTests() {
app
=
await
launchApp
(
appDir
,
appPort
,
{})
app
=
await
launchApp
(
appDir
,
appPort
,
{})
const
data
=
await
makeRequest
()
const
data
=
await
makeRequest
()
expect
(
data
).
toEqual
([{
title
:
'Nextjs'
}])
expect
(
data
).
toEqual
([{
title
:
'Nextjs'
}])
killApp
(
app
)
await
killApp
(
app
)
})
})
it
(
'should not throw if request body is already parsed in custom middleware'
,
async
()
=>
{
it
(
'should not throw if request body is already parsed in custom middleware'
,
async
()
=>
{
await
startServer
()
await
startServer
()
const
data
=
await
makeRequest
()
const
data
=
await
makeRequest
()
expect
(
data
).
toEqual
([{
title
:
'Nextjs'
}])
expect
(
data
).
toEqual
([{
title
:
'Nextjs'
}])
killApp
(
server
)
await
killApp
(
server
)
})
})
it
(
"should not throw if request's content-type is invalid"
,
async
()
=>
{
it
(
"should not throw if request's content-type is invalid"
,
async
()
=>
{
await
startServer
()
await
startServer
()
const
status
=
await
makeRequestWithInvalidContentType
()
const
status
=
await
makeRequestWithInvalidContentType
()
expect
(
status
).
toBe
(
200
)
expect
(
status
).
toBe
(
200
)
killApp
(
server
)
await
killApp
(
server
)
})
})
}
}
...
...
test/integration/config-experimental-warning/test/index.test.js
View file @
cd333000
...
@@ -38,13 +38,13 @@ async function collectStdoutFromBuild(appDir) {
...
@@ -38,13 +38,13 @@ async function collectStdoutFromBuild(appDir) {
}
}
describe
(
'Config Experimental Warning'
,
()
=>
{
describe
(
'Config Experimental Warning'
,
()
=>
{
afterEach
(()
=>
{
afterEach
(
async
()
=>
{
configFile
.
write
(
''
)
configFile
.
write
(
''
)
configFile
.
delete
()
configFile
.
delete
()
configFileMjs
.
write
(
''
)
configFileMjs
.
write
(
''
)
configFileMjs
.
delete
()
configFileMjs
.
delete
()
if
(
app
)
{
if
(
app
)
{
killApp
(
app
)
await
killApp
(
app
)
app
=
undefined
app
=
undefined
}
}
})
})
...
...
test/integration/config-mjs/test/index.test.js
View file @
cd333000
...
@@ -29,8 +29,8 @@ describe('Configuration', () => {
...
@@ -29,8 +29,8 @@ describe('Configuration', () => {
])
])
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
})
})
async
function
get
$
(
path
,
query
)
{
async
function
get
$
(
path
,
query
)
{
...
...
test/integration/config/test/index.test.js
View file @
cd333000
...
@@ -29,8 +29,8 @@ describe('Configuration', () => {
...
@@ -29,8 +29,8 @@ describe('Configuration', () => {
])
])
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
})
})
async
function
get
$
(
path
,
query
)
{
async
function
get
$
(
path
,
query
)
{
...
...
test/integration/custom-server/test/index.test.js
View file @
cd333000
...
@@ -174,8 +174,8 @@ describe.each([
...
@@ -174,8 +174,8 @@ describe.each([
if
(
!
useHttps
)
{
if
(
!
useHttps
)
{
describe
(
'HMR with custom server'
,
()
=>
{
describe
(
'HMR with custom server'
,
()
=>
{
beforeAll
(()
=>
startServer
())
beforeAll
(()
=>
startServer
())
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
server
)
await
killApp
(
server
)
indexPg
.
restore
()
indexPg
.
restore
()
})
})
...
...
test/integration/edge-runtime-configurable-guards/test/index.test.js
View file @
cd333000
...
@@ -45,9 +45,9 @@ describe('Edge runtime configurable guards', () => {
...
@@ -45,9 +45,9 @@ describe('Edge runtime configurable guards', () => {
context
.
logs
=
{
output
:
''
,
stdout
:
''
,
stderr
:
''
}
context
.
logs
=
{
output
:
''
,
stdout
:
''
,
stderr
:
''
}
})
})
afterEach
(()
=>
{
afterEach
(
async
()
=>
{
if
(
context
.
app
)
{
if
(
context
.
app
)
{
killApp
(
context
.
app
)
await
killApp
(
context
.
app
)
}
}
context
.
api
.
restore
()
context
.
api
.
restore
()
context
.
middleware
.
restore
()
context
.
middleware
.
restore
()
...
...
test/integration/edge-runtime-response-error/test/index.test.js
View file @
cd333000
...
@@ -44,9 +44,9 @@ describe('Edge runtime code with imports', () => {
...
@@ -44,9 +44,9 @@ describe('Edge runtime code with imports', () => {
await
remove
(
join
(
__dirname
,
'../.next'
))
await
remove
(
join
(
__dirname
,
'../.next'
))
})
})
afterEach
(()
=>
{
afterEach
(
async
()
=>
{
if
(
context
.
app
)
{
if
(
context
.
app
)
{
killApp
(
context
.
app
)
await
killApp
(
context
.
app
)
}
}
context
.
api
.
restore
()
context
.
api
.
restore
()
context
.
middleware
.
restore
()
context
.
middleware
.
restore
()
...
...
test/integration/empty-project/test/index.test.js
View file @
cd333000
...
@@ -20,8 +20,8 @@ describe('Empty Project', () => {
...
@@ -20,8 +20,8 @@ describe('Empty Project', () => {
expect
(
res
.
status
).
toBe
(
404
)
expect
(
res
.
status
).
toBe
(
404
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
fs
.
closeSync
(
fs
.
openSync
(
join
(
__dirname
,
'..'
,
'pages'
,
'.gitkeep'
),
'w'
))
fs
.
closeSync
(
fs
.
openSync
(
join
(
__dirname
,
'..'
,
'pages'
,
'.gitkeep'
),
'w'
))
})
})
})
})
test/integration/middleware-dev-update/test/index.test.js
View file @
cd333000
...
@@ -32,10 +32,10 @@ describe('Middleware development errors', () => {
...
@@ -32,10 +32,10 @@ describe('Middleware development errors', () => {
})
})
})
})
afterEach
(()
=>
{
afterEach
(
async
()
=>
{
context
.
middleware
.
restore
()
context
.
middleware
.
restore
()
if
(
context
.
app
)
{
if
(
context
.
app
)
{
killApp
(
context
.
app
)
await
killApp
(
context
.
app
)
}
}
})
})
...
...
test/integration/next-image-legacy/base-path/test/static.test.ts
View file @
cd333000
...
@@ -133,8 +133,8 @@ describe('Static Image Component Tests for basePath', () => {
...
@@ -133,8 +133,8 @@ describe('Static Image Component Tests for basePath', () => {
html
=
await
renderViaHTTP
(
appPort
,
'/docs/static-img'
)
html
=
await
renderViaHTTP
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
()
runTests
()
}
}
...
@@ -148,8 +148,8 @@ describe('Static Image Component Tests for basePath', () => {
...
@@ -148,8 +148,8 @@ describe('Static Image Component Tests for basePath', () => {
html
=
await
renderViaHTTP
(
appPort
,
'/docs/static-img'
)
html
=
await
renderViaHTTP
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
true
)
runTests
(
true
)
}
}
...
...
test/integration/next-image-legacy/default/test/static.test.ts
View file @
cd333000
...
@@ -153,8 +153,8 @@ describe('Static Image Component Tests', () => {
...
@@ -153,8 +153,8 @@ describe('Static Image Component Tests', () => {
html
=
await
renderViaHTTP
(
appPort
,
'/static-img'
)
html
=
await
renderViaHTTP
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
()
runTests
()
}
}
...
...
test/integration/next-image-legacy/unicode/test/index.test.ts
View file @
cd333000
...
@@ -76,8 +76,8 @@ describe('Image Component Unicode Image URL', () => {
...
@@ -76,8 +76,8 @@ describe('Image Component Unicode Image URL', () => {
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
@@ -94,8 +94,8 @@ describe('Image Component Unicode Image URL', () => {
...
@@ -94,8 +94,8 @@ describe('Image Component Unicode Image URL', () => {
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
...
test/integration/next-image-new/app-dir/test/static.test.ts
View file @
cd333000
...
@@ -262,8 +262,8 @@ describe('Static Image Component Tests', () => {
...
@@ -262,8 +262,8 @@ describe('Static Image Component Tests', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
false
)
runTests
(
false
)
}
}
...
@@ -278,8 +278,8 @@ describe('Static Image Component Tests', () => {
...
@@ -278,8 +278,8 @@ describe('Static Image Component Tests', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
true
)
runTests
(
true
)
}
}
...
...
test/integration/next-image-new/base-path/test/static.test.js
View file @
cd333000
...
@@ -207,8 +207,8 @@ describe('Static Image Component Tests for basePath', () => {
...
@@ -207,8 +207,8 @@ describe('Static Image Component Tests for basePath', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
false
)
runTests
(
false
)
}
}
...
@@ -223,8 +223,8 @@ describe('Static Image Component Tests for basePath', () => {
...
@@ -223,8 +223,8 @@ describe('Static Image Component Tests for basePath', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/docs/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
true
)
runTests
(
true
)
}
}
...
...
test/integration/next-image-new/default/test/static.test.ts
View file @
cd333000
...
@@ -269,8 +269,8 @@ describe('Static Image Component Tests', () => {
...
@@ -269,8 +269,8 @@ describe('Static Image Component Tests', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
false
)
runTests
(
false
)
}
}
...
@@ -285,8 +285,8 @@ describe('Static Image Component Tests', () => {
...
@@ -285,8 +285,8 @@ describe('Static Image Component Tests', () => {
$
=
cheerio
.
load
(
html
)
$
=
cheerio
.
load
(
html
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
browser
=
await
webdriver
(
appPort
,
'/static-img'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
true
)
runTests
(
true
)
}
}
...
...
test/integration/next-image-new/loader-config-default-loader-with-file/test/index.test.ts
View file @
cd333000
...
@@ -50,8 +50,8 @@ describe('Image Loader Config', () => {
...
@@ -50,8 +50,8 @@ describe('Image Loader Config', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/'
)
runTests
(
'/'
)
})
})
...
@@ -63,8 +63,8 @@ describe('Image Loader Config', () => {
...
@@ -63,8 +63,8 @@ describe('Image Loader Config', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/'
)
runTests
(
'/'
)
}
}
...
@@ -74,8 +74,8 @@ describe('Image Loader Config', () => {
...
@@ -74,8 +74,8 @@ describe('Image Loader Config', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/get-img-props'
)
runTests
(
'/get-img-props'
)
})
})
...
@@ -87,8 +87,8 @@ describe('Image Loader Config', () => {
...
@@ -87,8 +87,8 @@ describe('Image Loader Config', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/get-img-props'
)
runTests
(
'/get-img-props'
)
}
}
...
...
test/integration/next-image-new/loader-config-edge-runtime/test/index.test.ts
View file @
cd333000
...
@@ -51,8 +51,8 @@ describe('Image Loader Config with Edge Runtime', () => {
...
@@ -51,8 +51,8 @@ describe('Image Loader Config with Edge Runtime', () => {
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
@@ -69,8 +69,8 @@ describe('Image Loader Config with Edge Runtime', () => {
...
@@ -69,8 +69,8 @@ describe('Image Loader Config with Edge Runtime', () => {
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
...
test/integration/next-image-new/loader-config/test/index.test.ts
View file @
cd333000
...
@@ -43,8 +43,8 @@ describe('Image Loader Config new', () => {
...
@@ -43,8 +43,8 @@ describe('Image Loader Config new', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/'
)
runTests
(
'/'
)
})
})
...
@@ -56,8 +56,8 @@ describe('Image Loader Config new', () => {
...
@@ -56,8 +56,8 @@ describe('Image Loader Config new', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/'
)
runTests
(
'/'
)
}
}
...
@@ -67,8 +67,8 @@ describe('Image Loader Config new', () => {
...
@@ -67,8 +67,8 @@ describe('Image Loader Config new', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/get-img-props'
)
runTests
(
'/get-img-props'
)
})
})
...
@@ -80,8 +80,8 @@ describe('Image Loader Config new', () => {
...
@@ -80,8 +80,8 @@ describe('Image Loader Config new', () => {
appPort
=
await
findPort
()
appPort
=
await
findPort
()
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
})
})
runTests
(
'/get-img-props'
)
runTests
(
'/get-img-props'
)
}
}
...
...
test/integration/next-image-new/unicode/test/index.test.ts
View file @
cd333000
...
@@ -76,8 +76,8 @@ describe('Image Component Unicode Image URL', () => {
...
@@ -76,8 +76,8 @@ describe('Image Component Unicode Image URL', () => {
app
=
await
launchApp
(
appDir
,
appPort
)
app
=
await
launchApp
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
@@ -94,8 +94,8 @@ describe('Image Component Unicode Image URL', () => {
...
@@ -94,8 +94,8 @@ describe('Image Component Unicode Image URL', () => {
app
=
await
nextStart
(
appDir
,
appPort
)
app
=
await
nextStart
(
appDir
,
appPort
)
browser
=
await
webdriver
(
appPort
,
'/'
)
browser
=
await
webdriver
(
appPort
,
'/'
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
app
)
await
killApp
(
app
)
if
(
browser
)
{
if
(
browser
)
{
browser
.
close
()
browser
.
close
()
}
}
...
...
test/integration/ondemand/test/index.test.js
View file @
cd333000
...
@@ -34,8 +34,8 @@ const startServer = async (optEnv = {}, opts) => {
...
@@ -34,8 +34,8 @@ const startServer = async (optEnv = {}, opts) => {
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
await
startServer
()
await
startServer
()
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
})
})
it
(
'should compile pages for SSR'
,
async
()
=>
{
it
(
'should compile pages for SSR'
,
async
()
=>
{
...
...
test/integration/plugin-mdx-rs/test/index.test.js
View file @
cd333000
...
@@ -18,8 +18,8 @@ describe('MDX-rs Configuration', () => {
...
@@ -18,8 +18,8 @@ describe('MDX-rs Configuration', () => {
context
.
appPort
=
await
findPort
()
context
.
appPort
=
await
findPort
()
context
.
server
=
await
launchApp
(
join
(
__dirname
,
'../'
),
context
.
appPort
)
context
.
server
=
await
launchApp
(
join
(
__dirname
,
'../'
),
context
.
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
})
})
it
(
'should render an MDX page correctly'
,
async
()
=>
{
it
(
'should render an MDX page correctly'
,
async
()
=>
{
expect
(
await
renderViaHTTP
(
context
.
appPort
,
'/'
)).
toMatch
(
/Hello MDX/
)
expect
(
await
renderViaHTTP
(
context
.
appPort
,
'/'
)).
toMatch
(
/Hello MDX/
)
...
@@ -60,8 +60,8 @@ describe('MDX-rs Configuration', () => {
...
@@ -60,8 +60,8 @@ describe('MDX-rs Configuration', () => {
context
.
appPort
=
await
findPort
()
context
.
appPort
=
await
findPort
()
context
.
server
=
await
launchApp
(
join
(
__dirname
,
'../'
),
context
.
appPort
)
context
.
server
=
await
launchApp
(
join
(
__dirname
,
'../'
),
context
.
appPort
)
})
})
afterAll
(()
=>
{
afterAll
(
async
()
=>
{
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
nextConfig
.
restore
()
nextConfig
.
restore
()
})
})
...
...
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