stabilize forgejo ci bun path and mocks
Some checks failed
CI / Validate (push) Failing after 1m7s

This commit is contained in:
dirtydishes 2026-05-30 01:44:45 -04:00
parent e5867e6f73
commit 4ae32c4f3b
3 changed files with 275 additions and 4 deletions

View file

@ -4,7 +4,8 @@ const redirect = mock((path: string) => {
throw new Error(`NEXT_REDIRECT:${path}`); throw new Error(`NEXT_REDIRECT:${path}`);
}); });
mock.module("next/navigation", () => ({ redirect })); mock.module("next/navigation", () => ({ default: { redirect }, redirect }));
mock.module("next/navigation.js", () => ({ default: { redirect }, redirect }));
describe("legacy page redirects", () => { describe("legacy page redirects", () => {
beforeEach(() => { beforeEach(() => {

View file

@ -1,6 +1,16 @@
import { describe, expect, it } from "bun:test"; import { describe, expect, it, mock } from "bun:test";
import { getSubscriptionKey as getLiveSubscriptionKey } from "@islandflow/types"; import { getSubscriptionKey as getLiveSubscriptionKey } from "@islandflow/types";
import {
const redirect = mock((path: string) => {
throw new Error(`NEXT_REDIRECT:${path}`);
});
mock.module("next/navigation", () => ({
redirect,
usePathname: () => "/options"
}));
const {
NAV_ITEMS, NAV_ITEMS,
appendHistoryTail, appendHistoryTail,
buildAlertContextPath, buildAlertContextPath,
@ -49,7 +59,7 @@ import {
resolveAlertFlowPacket, resolveAlertFlowPacket,
statusLabel, statusLabel,
toggleFilterValue toggleFilterValue
} from "./terminal"; } = await import("./terminal");
const makeItem = (traceId: string, seq: number, ts: number) => ({ const makeItem = (traceId: string, seq: number, ts: number) => ({
trace_id: traceId, trace_id: traceId,

File diff suppressed because one or more lines are too long