mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
Probes in a source and a built project read each collected test's deadline, including test, suite, and module long-running tags, so a change in project inheritance or tag resolution fails directly. Both the policy and the probes read one set of base deadlines. Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
562 B
TypeScript
17 lines
562 B
TypeScript
import { expect, inject, it } from "vitest";
|
|
import {
|
|
COVERAGE_DEADLINE_SCALE,
|
|
HOSTED_RUNNER_DEADLINE_SCALE,
|
|
TEST_DEADLINE_MS,
|
|
} from "../support/testDeadlines.js";
|
|
|
|
it("applies the source project deadline, scaled by coverage and hosted runners", ({
|
|
task,
|
|
}) => {
|
|
const scale = inject("testDeadlineScale");
|
|
const coverage = [1, COVERAGE_DEADLINE_SCALE];
|
|
const hosted = [1, HOSTED_RUNNER_DEADLINE_SCALE];
|
|
expect(coverage.flatMap((c) => hosted.map((h) => c * h))).toContain(scale);
|
|
expect(task.timeout).toBe(TEST_DEADLINE_MS.source * scale);
|
|
});
|