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
982e880f
Unverified
Commit
982e880f
authored
Apr 09, 2020
by
JJ Kasper
Committed by
GitHub
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CNA tests on windows for further investigating (#11779)
parent
0c2a6d8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
41 deletions
+49
-41
index.test.js
test/integration/create-next-app/index.test.js
+49
-41
No files found.
test/integration/create-next-app/index.test.js
View file @
982e880f
...
@@ -29,7 +29,7 @@ const runStarter = (...args) => {
...
@@ -29,7 +29,7 @@ const runStarter = (...args) => {
describe
(
'create next app'
,
()
=>
{
describe
(
'create next app'
,
()
=>
{
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
jest
.
setTimeout
(
1000
*
60
*
3
)
jest
.
setTimeout
(
1000
*
60
*
2
)
await
fs
.
mkdirp
(
cwd
)
await
fs
.
mkdirp
(
cwd
)
})
})
...
@@ -47,6 +47,9 @@ describe('create next app', () => {
...
@@ -47,6 +47,9 @@ describe('create next app', () => {
}
}
})
})
// TODO: investigate why this test stalls on yarn install when
// stdin is piped instead of inherited on windows
if
(
process
.
platform
!==
'win32'
)
{
it
(
'empty directory'
,
async
()
=>
{
it
(
'empty directory'
,
async
()
=>
{
const
projectName
=
'empty-directory'
const
projectName
=
'empty-directory'
const
res
=
await
runStarter
(
projectName
)
const
res
=
await
runStarter
(
projectName
)
...
@@ -59,6 +62,7 @@ describe('create next app', () => {
...
@@ -59,6 +62,7 @@ describe('create next app', () => {
fs
.
existsSync
(
path
.
join
(
cwd
,
projectName
,
'pages/index.js'
))
fs
.
existsSync
(
path
.
join
(
cwd
,
projectName
,
'pages/index.js'
))
).
toBeTruthy
()
).
toBeTruthy
()
})
})
}
it
(
'invalid example name'
,
async
()
=>
{
it
(
'invalid example name'
,
async
()
=>
{
const
projectName
=
'invalid-example-name'
const
projectName
=
'invalid-example-name'
...
@@ -163,6 +167,9 @@ describe('create next app', () => {
...
@@ -163,6 +167,9 @@ describe('create next app', () => {
).
toBeTruthy
()
).
toBeTruthy
()
})
})
// TODO: investigate why this test stalls on yarn install when
// stdin is piped instead of inherited on windows
if
(
process
.
platform
!==
'win32'
)
{
it
(
'should allow to manually select an example'
,
async
()
=>
{
it
(
'should allow to manually select an example'
,
async
()
=>
{
const
runExample
=
(...
args
)
=>
{
const
runExample
=
(...
args
)
=>
{
const
res
=
run
(...
args
)
const
res
=
run
(...
args
)
...
@@ -200,4 +207,5 @@ describe('create next app', () => {
...
@@ -200,4 +207,5 @@ describe('create next app', () => {
expect
(
res
.
exitCode
).
toBe
(
0
)
expect
(
res
.
exitCode
).
toBe
(
0
)
expect
(
res
.
stdout
).
toMatch
(
/Downloading files for example hello-world/
)
expect
(
res
.
stdout
).
toMatch
(
/Downloading files for example hello-world/
)
})
})
}
})
})
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