1
- import { stderr } from 'stdout-stderr'
1
+ import { stderr , stdout } from 'stdout-stderr'
2
2
import nock from 'nock'
3
3
import { expect } from 'chai'
4
4
import Cmd from '../../../../src/commands/access/add.js'
@@ -19,7 +19,7 @@ describe('heroku access:add', function () {
19
19
} )
20
20
21
21
afterEach ( function ( ) {
22
- return nock . cleanAll ( )
22
+ nock . cleanAll ( )
23
23
} )
24
24
25
25
it ( 'adds user to the app with permissions, even specifying the view permission' , async function ( ) {
@@ -33,6 +33,7 @@ describe('heroku access:add', function () {
33
33
apiGet . done ( )
34
34
apiGetOrgFeatures . done ( )
35
35
apiPost . done ( )
36
+ expect ( '' ) . to . eq ( stdout . output )
36
37
expect ( stderr . output ) . to . include ( 'Adding [email protected] access to the app myapp with deploy, view permissions... done' )
37
38
} )
38
39
@@ -47,6 +48,7 @@ describe('heroku access:add', function () {
47
48
apiGet . done ( )
48
49
apiGetOrgFeatures . done ( )
49
50
apiPost . done ( )
51
+ expect ( '' ) . to . eq ( stdout . output )
50
52
expect ( stderr . output ) . to . include ( 'Adding [email protected] access to the app myapp with deploy, view permissions... done' )
51
53
} )
52
54
@@ -73,7 +75,7 @@ describe('heroku access:add', function () {
73
75
} )
74
76
75
77
afterEach ( function ( ) {
76
- return nock . cleanAll ( )
78
+ nock . cleanAll ( )
77
79
} )
78
80
79
81
it ( 'adds user to the app' , async function ( ) {
@@ -85,6 +87,7 @@ describe('heroku access:add', function () {
85
87
apiGet . done ( )
86
88
apiGetOrgFeatures . done ( )
87
89
apiPost . done ( )
90
+ expect ( '' ) . to . eq ( stdout . output )
88
91
expect ( stderr . output ) . to . include ( 'Adding [email protected] access to the app myapp... done' )
89
92
} )
90
93
} )
@@ -96,7 +99,7 @@ describe('heroku access:add', function () {
96
99
} )
97
100
98
101
afterEach ( function ( ) {
99
- return nock . cleanAll ( )
102
+ nock . cleanAll ( )
100
103
} )
101
104
102
105
it ( 'adds user to the app as a collaborator' , async function ( ) {
@@ -107,6 +110,7 @@ describe('heroku access:add', function () {
107
110
] )
108
111
apiGet . done ( )
109
112
apiPost . done ( )
113
+ expect ( '' ) . to . eq ( stdout . output )
110
114
expect ( stderr . output ) . to . include ( 'Adding [email protected] access to the app myapp... done' )
111
115
} )
112
116
} )
0 commit comments