ci: disable automatic workflow triggers

This commit is contained in:
gsxdsm
2026-04-12 13:48:13 -07:00
parent 51f31f099a
commit ecfe134591
8 changed files with 77 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { EventEmitter } from "node:events";
// ── Capture arguments ───────────────────────────────────────────────
@@ -6,6 +6,10 @@ import { EventEmitter } from "node:events";
// Minimal mock store backed by EventEmitter so `store.on` works
function makeMockStore() {
const emitter = new EventEmitter();
// runDashboard registers several independent settings listeners by design;
// keep the test mock above Node's low default threshold while still checking
// startup wiring behavior.
emitter.setMaxListeners(20);
const mockMissionStore = {
listMissions: vi.fn().mockReturnValue([]),
getMission: vi.fn(),
@@ -214,10 +218,28 @@ vi.mock("@mariozechner/pi-coding-agent", () => ({
// ── Import module under test (after mocks) ──────────────────────────
const { runDashboard } = await import("../dashboard.js");
const { runDashboard: runDashboardImpl } = await import("../dashboard.js");
const dashboardDisposables: Array<() => void> = [];
function disposeTrackedDashboards(): void {
for (const dispose of dashboardDisposables.splice(0)) {
dispose();
}
}
async function runDashboard(...args: Parameters<typeof runDashboardImpl>): ReturnType<typeof runDashboardImpl> {
disposeTrackedDashboards();
const result = await runDashboardImpl(...args);
dashboardDisposables.push(result.dispose);
return result;
}
// ── Tests ───────────────────────────────────────────────────────────
afterEach(() => {
disposeTrackedDashboards();
});
describe("runDashboard — AuthStorage & ModelRegistry wiring", () => {
beforeEach(async () => {
vi.clearAllMocks();