update download-artifact tests for public and internal impl

This commit is contained in:
Rob Herley
2023-12-01 01:32:45 +00:00
committed by GitHub
parent 22b7aeb707
commit 32549e8197
6 changed files with 224 additions and 53 deletions

View File

@@ -0,0 +1,9 @@
import * as core from '@actions/core'
// noopLogs mocks the console.log and core.* functions to prevent output in the console while testing
export const noopLogs = (): void => {
jest.spyOn(console, 'log').mockImplementation(() => {})
jest.spyOn(core, 'debug').mockImplementation(() => {})
jest.spyOn(core, 'info').mockImplementation(() => {})
jest.spyOn(core, 'warning').mockImplementation(() => {})
}