Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ describe('missmatch', () => {

it('should exit with 0 by default as there is a missmatch', async () => {
await mod.run()
return expect(processExitSpy).toBeCalledWith(0)
return expect(processExitSpy).toHaveBeenCalledWith(0)
})
it('should exit with 122 if defined when there is a missmatch', async () => {
process.env.EXIT_CODE_ON_MISMATCH = '122'
await mod.run()
return expect(processExitSpy).toBeCalledWith(122)
return expect(processExitSpy).toHaveBeenCalledWith(122)
})
it('should not add users if not set to', async () => {
delete process.env.ADD_USERS
await mod.run()
return expect(github.addUsersToGitHubOrg).not.toBeCalled()
return expect(github.addUsersToGitHubOrg).not.toHaveBeenCalled()
})
it('should not remove users if not set to', async () => {
delete process.env.REMOVE_USERS
await mod.run()
return expect(github.removeUsersFromGitHubOrg).not.toBeCalled()
return expect(github.removeUsersFromGitHubOrg).not.toHaveBeenCalled()
})
it('should add users if set to', async () => {
process.env.ADD_USERS = 'true'
Expand Down Expand Up @@ -79,21 +79,21 @@ describe('match', () => {
})
it('should exit with 0 by default', async () => {
await mod.run()
return expect(processExitSpy).toBeCalledWith(0)
return expect(processExitSpy).toHaveBeenCalledWith(0)
})
it('should not exit with 122 if defined', async () => {
process.env.EXIT_CODE_ON_MISMATCH = '122'
await mod.run()
return expect(processExitSpy).not.toBeCalledWith(122)
return expect(processExitSpy).not.toHaveBeenCalledWith(122)
})
it('should not add users', async () => {
process.env.ADD_USERS = 'true'
await mod.run()
return expect(github.addUsersToGitHubOrg).not.toBeCalled()
return expect(github.addUsersToGitHubOrg).not.toHaveBeenCalled()
})
it('should not remove users', async () => {
process.env.REMOVE_USERS = 'true'
await mod.run()
return expect(github.removeUsersFromGitHubOrg).not.toBeCalled()
return expect(github.removeUsersFromGitHubOrg).not.toHaveBeenCalled()
})
})