mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-05-03 06:08:05 +08:00
update download-artifact tests for public and internal impl
This commit is contained in:
9
packages/artifact/__tests__/common.ts
Normal file
9
packages/artifact/__tests__/common.ts
Normal 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(() => {})
|
||||
}
|
||||
Reference in New Issue
Block a user