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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import test from "node:test";
import assert from "node:assert/strict";

const { REGISTRY } = await import("../../../open-sse/config/providerRegistry.ts");
const { REGISTRY } = await import("../../open-sse/config/providerRegistry.ts");

const blackbox = (REGISTRY as Record<string, Record<string, unknown>>).blackbox;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ process.env.DATA_DIR = TEST_DATA_DIR;
process.env.JWT_SECRET = process.env.JWT_SECRET || "test-jwt-secret-idc-2059";
process.env.API_KEY_SECRET = process.env.API_KEY_SECRET || "test-api-key-secret-idc-2059";

const core = await import("../../../src/lib/db/core.ts");
const core = await import("../../src/lib/db/core.ts");

// Import route module once (DB is initialized on first import).
const { GET } = await import("../../../src/app/api/oauth/kiro/auto-import/route.ts");
const { GET } = await import("../../src/app/api/oauth/kiro/auto-import/route.ts");

const ORIGINAL_HOME = process.env.HOME;
const ORIGINAL_APPDATA = process.env.APPDATA;
Expand Down Expand Up @@ -302,7 +302,7 @@ test("auto-import: clientIdHash present but registration file missing — gracef
// ── Tests: schema ─────────────────────────────────────────────────────────────

test("kiroImportSchema: accepts optional IDC fields (clientId, clientSecret, authMethod, profileArn)", async () => {
const { kiroImportSchema } = await import("../../../src/shared/validation/schemas/auth.ts");
const { kiroImportSchema } = await import("../../src/shared/validation/schemas/auth.ts");

const result = kiroImportSchema.safeParse({
refreshToken: "aorAAAAAGsome-token",
Expand Down Expand Up @@ -330,7 +330,7 @@ test("kiroImportSchema: accepts optional IDC fields (clientId, clientSecret, aut
});

test("kiroImportSchema: still valid without IDC fields (backward compat)", async () => {
const { kiroImportSchema } = await import("../../../src/shared/validation/schemas/auth.ts");
const { kiroImportSchema } = await import("../../src/shared/validation/schemas/auth.ts");

const result = kiroImportSchema.safeParse({
refreshToken: "aorAAAAAGsome-token",
Expand All @@ -344,7 +344,7 @@ test("kiroImportSchema: still valid without IDC fields (backward compat)", async
});

test("kiroImportSchema: rejects non-string clientId", async () => {
const { kiroImportSchema } = await import("../../../src/shared/validation/schemas/auth.ts");
const { kiroImportSchema } = await import("../../src/shared/validation/schemas/auth.ts");

const result = kiroImportSchema.safeParse({
refreshToken: "aorAAAAAGsome-token",
Expand Down
Loading