Skip to content

Commit 93044cf

Browse files
committed
Add expects for empty stdout
1 parent 3bb03b2 commit 93044cf

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

packages/cli/test/unit/commands/access/add.unit.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {stderr} from 'stdout-stderr'
1+
import {stderr, stdout} from 'stdout-stderr'
22
import nock from 'nock'
33
import {expect} from 'chai'
44
import Cmd from '../../../../src/commands/access/add.js'
@@ -19,7 +19,7 @@ describe('heroku access:add', function () {
1919
})
2020

2121
afterEach(function () {
22-
return nock.cleanAll()
22+
nock.cleanAll()
2323
})
2424

2525
it('adds user to the app with permissions, even specifying the view permission', async function () {
@@ -33,6 +33,7 @@ describe('heroku access:add', function () {
3333
apiGet.done()
3434
apiGetOrgFeatures.done()
3535
apiPost.done()
36+
expect('').to.eq(stdout.output)
3637
expect(stderr.output).to.include('Adding [email protected] access to the app myapp with deploy, view permissions... done')
3738
})
3839

@@ -47,6 +48,7 @@ describe('heroku access:add', function () {
4748
apiGet.done()
4849
apiGetOrgFeatures.done()
4950
apiPost.done()
51+
expect('').to.eq(stdout.output)
5052
expect(stderr.output).to.include('Adding [email protected] access to the app myapp with deploy, view permissions... done')
5153
})
5254

@@ -73,7 +75,7 @@ describe('heroku access:add', function () {
7375
})
7476

7577
afterEach(function () {
76-
return nock.cleanAll()
78+
nock.cleanAll()
7779
})
7880

7981
it('adds user to the app', async function () {
@@ -85,6 +87,7 @@ describe('heroku access:add', function () {
8587
apiGet.done()
8688
apiGetOrgFeatures.done()
8789
apiPost.done()
90+
expect('').to.eq(stdout.output)
8891
expect(stderr.output).to.include('Adding [email protected] access to the app myapp... done')
8992
})
9093
})
@@ -96,7 +99,7 @@ describe('heroku access:add', function () {
9699
})
97100

98101
afterEach(function () {
99-
return nock.cleanAll()
102+
nock.cleanAll()
100103
})
101104

102105
it('adds user to the app as a collaborator', async function () {
@@ -107,6 +110,7 @@ describe('heroku access:add', function () {
107110
])
108111
apiGet.done()
109112
apiPost.done()
113+
expect('').to.eq(stdout.output)
110114
expect(stderr.output).to.include('Adding [email protected] access to the app myapp... done')
111115
})
112116
})

packages/cli/test/unit/commands/access/update.unit.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {personalApp, teamApp} from '../../../helpers/stubs/get.js'
77
import {appCollaboratorWithPermissions} from '../../../helpers/stubs/patch.js'
88
import stripAnsi from 'strip-ansi'
99

10-
1110
describe('heroku access:update', function () {
1211
context('with a team app with permissions', function () {
1312
afterEach(function () {

0 commit comments

Comments
 (0)