Files
scriptc/tests/harness/effect.test.ts
Chris Tate cc75597869 Shorten the CI critical path (#605)
* Shorten the CI critical path

* Bound Effect runner memory and avoid repeated type checks
2026-10-01 22:18:40 -05:00

17 lines
871 B
TypeScript

import { globSync } from "node:fs";
import { basename, join } from "node:path";
import { test } from "vitest";
import { balancedShardSelect } from "./shard.js";
import { checkEffectFixture } from "./effect-runner.js";
import fixtureCosts from "./effect-costs.json";
const sanitize = process.env["SCRIPTC_SAN"] === "1";
const fixtures = globSync(join(import.meta.dirname, "../fixtures/effect/*.ts")).sort();
const costs: Record<string, number> = fixtureCosts;
const cases = balancedShardSelect(fixtures, (file) => basename(file), (file) => costs[basename(file)] ?? 120);
const concurrent = process.env["SCRIPTC_EFFECT_TEST_CONCURRENCY"] === "2";
test.for(cases)("published Effect %s matches Node statically", { concurrent, timeout: 600_000 }, async (entry) => {
await checkEffectFixture(entry, ["effect", "fast-check", "pure-rand"], sanitize ? "dev" : "release");
});