INNER CODE UNIT · TypeScript
mockContextData
mikepenz/action-junit-report · __tests__/annotator.test.ts:9
const mockContextData = vi.hoisted(() => ({
issue: {number: undefined as number | undefined},
repo: {owner: 'test-owner', repo: 'test-repo'}
}))
// Mock core.warning function
const mockWarning = vi.hoisted(() => vi.fn())
vi.mock('@actions/core', async () => {
const actual = await vi.importActual('@actions/core')
return {
...actual,
warning: mockWarning
}
})
vi.mock('@actions/github', async () => {
const actual = await vi.importActual('@actions/github')