Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/unit/gadgets/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ vi.mock('../../../src/utils/repo.js', () => ({
runCommand: vi.fn(),
}));

// Mock run link to prevent env var leakage from CASCADE agent environment
vi.mock('../../../src/utils/runLink.js', () => ({
buildRunLinkFooterFromEnv: vi.fn(() => ''),
}));

const REMOTE_URL = 'https://x-access-token@github.com/test-owner/test-repo.git';

/** Mock runCommand to handle git remote detection + other commands via a delegate */
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/gadgets/github/core/misc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ vi.mock('../../../../../src/github/client.js', () => ({
},
}));

// Mock run link to prevent env var leakage from CASCADE agent environment
vi.mock('../../../../../src/utils/runLink.js', () => ({
buildRunLinkFooterFromEnv: vi.fn(() => ''),
}));

import { createPRReview } from '../../../../../src/gadgets/github/core/createPRReview.js';
import {
formatCheckStatus,
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/gadgets/pm/core/postComment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ vi.mock('../../../../../src/utils/logging.js', () => ({
},
}));

vi.mock('../../../../../src/utils/runLink.js', () => ({
buildRunLinkFooterFromEnv: vi.fn(() => ''),
}));

import {
clearProgressCommentId,
readProgressCommentId,
Expand Down
Loading