From bbc4f562cd99e5a902413d0bbe93822c739b55aa Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Tue, 31 Oct 2023 17:26:02 -0600 Subject: [PATCH] jest.spyOn GitHub core methods to clean up the test output --- __tests__/main.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 7a25abc..8205e39 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -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 () => {