Files
scriptc/tests/harness/effect4.test.ts
Chris Tate c08ab955ae Enforce linting and consistent source formatting
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks.
- Preserve compiler import boundaries and protected fixtures while cleaning up lint findings.
- Standardize source formatting and validate import, fixture, and embedded-source protections.
2026-10-05 17:51:24 -05:00

32 lines
1.1 KiB
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 "./effect4-costs.json";
const fixtures = globSync(join(import.meta.dirname, "../fixtures/effect4/*.ts"))
.filter((file) => !file.endsWith(".d.ts"))
.sort();
// Recorded plain/sanitizer fixture seconds guide scheduling only. New fixtures
// receive an estimate and remain in every complete matrix partition.
const costs: Record<string, number> = fixtureCosts;
const cases = balancedShardSelect(
fixtures,
(file) => basename(file),
(file) => costs[basename(file)] ?? 40,
);
const concurrent = process.env["SCRIPTC_EFFECT_TEST_CONCURRENCY"] === "2";
test.for(cases)(
"published Effect 4 %s matches Node statically",
{ concurrent, timeout: 600_000 },
async (entry) => {
await checkEffectFixture(
entry,
["effect", "@effect/platform-node", "@effect/platform-node-shared", "undici"],
"dev",
);
},
);