perf: reduce hot test imports and duplicate scans

This commit is contained in:
Peter Steinberger
2026-04-27 23:47:23 +01:00
parent f7815cdd8f
commit 9f9bcfe231
2 changed files with 6 additions and 4 deletions

View File

@@ -27,7 +27,10 @@ import { logWarn } from "../logger.js";
import type { ManagedRun } from "../process/supervisor/index.js";
import { getProcessSupervisor } from "../process/supervisor/index.js";
import type { RunExit, TerminationReason } from "../process/supervisor/types.js";
import { normalizeDeliveryContext, type DeliveryContext } from "../utils/delivery-context.js";
import {
normalizeDeliveryContext,
type DeliveryContext,
} from "../utils/delivery-context.shared.js";
import {
addSession,
appendOutput,

View File

@@ -6,8 +6,9 @@ import {
} from "../../scripts/test-live-shard.mjs";
describe("scripts/test-live-shard", () => {
const allFiles = collectAllLiveTestFiles();
it("partitions every native live test into exactly one release shard", () => {
const allFiles = collectAllLiveTestFiles();
const selected = LIVE_TEST_SHARDS.flatMap((shard) =>
selectLiveShardFiles(shard, allFiles).map((file) => ({ file, shard })),
);
@@ -19,8 +20,6 @@ describe("scripts/test-live-shard", () => {
});
it("keeps slow gateway backend and media-capable extension files in their own shards", () => {
const allFiles = collectAllLiveTestFiles();
expect(selectLiveShardFiles("native-live-src-gateway-backends", allFiles)).toEqual(
expect.arrayContaining([
"src/gateway/gateway-acp-bind.live.test.ts",