From 3a9ef1e02f62c46b79b90933626c221b828a5950 Mon Sep 17 00:00:00 2001 From: Espen Carlsen Date: Tue, 1 Jul 2025 10:53:33 +0000 Subject: [PATCH] chore(test): switch from deprecated jest aliases --- tests/index.spec.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/index.spec.ts b/tests/index.spec.ts index f9ebb5f35..a823f84e2 100644 --- a/tests/index.spec.ts +++ b/tests/index.spec.ts @@ -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' @@ -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() }) })