jest.spyOn GitHub core methods to clean up the test output

This commit is contained in:
GrantBirki 2023-10-31 17:26:02 -06:00
parent 71a9d8ba39
commit bbc4f562cd
No known key found for this signature in database
GPG Key ID: 9029BBCCC15C6F8C

View File

@ -24,6 +24,11 @@ const timeRegex = /^\d{2}:\d{2}:\d{2}/
describe('action', () => {
beforeEach(() => {
jest.clearAllMocks()
jest.spyOn(core, 'debug').mockImplementation()
jest.spyOn(core, 'error').mockImplementation()
jest.spyOn(core, 'getInput').mockImplementation()
jest.spyOn(core, 'setFailed').mockImplementation()
jest.spyOn(core, 'setOutput').mockImplementation()
})
it('sets the time output', async () => {