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
79090718
Unverified
Commit
79090718
authored
Sep 10, 2019
by
Joe Haddad
Committed by
GitHub
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test non-flag and re-runs of telemetry cmds (#8697)
parent
7b933f67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
index.test.js
test/integration/telemetry/test/index.test.js
+34
-2
No files found.
test/integration/telemetry/test/index.test.js
View file @
79090718
...
@@ -12,7 +12,7 @@ describe('Telemetry CLI', () => {
...
@@ -12,7 +12,7 @@ describe('Telemetry CLI', () => {
expect
(
stdout
).
toMatch
(
/Status: .*/
)
expect
(
stdout
).
toMatch
(
/Status: .*/
)
})
})
it
(
'can enable telemetry'
,
async
()
=>
{
it
(
'can enable telemetry
with flag
'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'--enable'
],
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'--enable'
],
{
stdout
:
true
stdout
:
true
})
})
...
@@ -20,11 +20,43 @@ describe('Telemetry CLI', () => {
...
@@ -20,11 +20,43 @@ describe('Telemetry CLI', () => {
expect
(
stdout
).
toMatch
(
/Status: Enabled/
)
expect
(
stdout
).
toMatch
(
/Status: Enabled/
)
})
})
it
(
'can disable telemetry'
,
async
()
=>
{
it
(
'can disable telemetry
with flag
'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'--disable'
],
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'--disable'
],
{
stdout
:
true
stdout
:
true
})
})
expect
(
stdout
).
toMatch
(
/Your preference has been saved/
)
expect
(
stdout
).
toMatch
(
/Your preference has been saved/
)
expect
(
stdout
).
toMatch
(
/Status: Disabled/
)
expect
(
stdout
).
toMatch
(
/Status: Disabled/
)
})
})
it
(
'can enable telemetry without flag'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'enable'
],
{
stdout
:
true
})
expect
(
stdout
).
toMatch
(
/Success/
)
expect
(
stdout
).
toMatch
(
/Status: Enabled/
)
})
it
(
'can re-enable telemetry'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'enable'
],
{
stdout
:
true
})
expect
(
stdout
).
toMatch
(
/Success/
)
expect
(
stdout
).
toMatch
(
/Status: Enabled/
)
})
it
(
'can disable telemetry without flag'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'disable'
],
{
stdout
:
true
})
expect
(
stdout
).
toMatch
(
/Your preference has been saved/
)
expect
(
stdout
).
toMatch
(
/Status: Disabled/
)
})
it
(
'can re-disable telemetry'
,
async
()
=>
{
const
{
stdout
}
=
await
runNextCommand
([
'telemetry'
,
'disable'
],
{
stdout
:
true
})
expect
(
stdout
).
toMatch
(
/already disabled/
)
expect
(
stdout
).
toMatch
(
/Status: Disabled/
)
})
})
})
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