Files
OmniRoute/tests/unit/electron-packaging.test.ts
diegosouzapw dff836ae26 fix(ci): resolve remaining CI failures (typecheck + build-reorg test drift + #3100 dedup)
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.
2026-06-03 22:12:17 -03:00

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: ["**/*"],
}
);
});