perf(test): speed up local and CI validation
This commit is contained in:
@@ -1361,7 +1361,9 @@ describe("CdpBrowserProvider", () => {
|
||||
}),
|
||||
{ signal: controller.signal },
|
||||
);
|
||||
await waitForCommand(browser, "Target.attachToTarget");
|
||||
// Wait until the attach response has been consumed and capture has begun.
|
||||
// Seeing the attach request alone races its response under worker load.
|
||||
await waitForCommand(browser, "Page.getFrameTree");
|
||||
controller.abort();
|
||||
const result = await pending;
|
||||
expect(result).toMatchObject({
|
||||
|
||||
@@ -21,6 +21,10 @@ describe("package installation workflows", () => {
|
||||
expect(continuousIntegration).toContain("name: Static checks");
|
||||
expect(continuousIntegration).toContain("npm run check:ci");
|
||||
expect(continuousIntegration).toContain("shard: [1/2, 2/2]");
|
||||
expect(continuousIntegration).toContain("name: Build package");
|
||||
expect(continuousIntegration).toContain("npm run build:cached");
|
||||
expect(continuousIntegration).toContain("name: rea-dist");
|
||||
expect(continuousIntegration).toContain("npm run test:ci:shard:run");
|
||||
expect(continuousIntegration).toContain("needs: [changes, test-shard]");
|
||||
expect(continuousIntegration).toContain("if-no-files-found: error");
|
||||
expect(continuousIntegration).toContain("overwrite: true");
|
||||
|
||||
@@ -1809,12 +1809,14 @@ describe("process capture adapter", () => {
|
||||
reactive: {
|
||||
version: 1,
|
||||
initial_state: "waiting",
|
||||
deadline_ms: 2_000,
|
||||
deadline_ms: 5_000,
|
||||
states: [
|
||||
{
|
||||
id: "waiting",
|
||||
max_visits: 1,
|
||||
deadline_ms: 300,
|
||||
// Leave process startup scheduling headroom; this test targets
|
||||
// post-exit settlement ordering, not a 300ms startup deadline.
|
||||
deadline_ms: 2_000,
|
||||
on: [
|
||||
{
|
||||
id: "unreachable",
|
||||
@@ -1913,7 +1915,7 @@ describe("process capture adapter", () => {
|
||||
} finally {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
}, 10_000);
|
||||
|
||||
it("renders terminal state, records shim invocations, and captures literal checkpoints", async () => {
|
||||
const root = await createTestTempDirectory("rea-v3-test-");
|
||||
|
||||
@@ -185,7 +185,7 @@ describe("process-capture MCP elicitation", () => {
|
||||
);
|
||||
const echoedState =
|
||||
failure === "tampered"
|
||||
? `${requestState.slice(0, -1)}${requestState.endsWith("A") ? "B" : "A"}`
|
||||
? `${requestState.startsWith("A") ? "B" : "A"}${requestState.slice(1)}`
|
||||
: requestState;
|
||||
const retryMethod: string = "tools/call";
|
||||
await expect(
|
||||
|
||||
@@ -8,6 +8,7 @@ import { describe, expect, it } from "vitest";
|
||||
|
||||
import vitestConfiguration, {
|
||||
SERIAL_INTEGRATION_TESTS,
|
||||
SUBPROCESS_TESTS,
|
||||
} from "../vitest.config.js";
|
||||
|
||||
const execute = promisify(execFile);
|
||||
@@ -24,7 +25,7 @@ describe("Vitest project configuration", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("collects exact disjoint parallel and serial test sets", async () => {
|
||||
it("collects exact disjoint unit, subprocess, and serial test sets", async () => {
|
||||
const { stdout } = await execute(
|
||||
process.execPath,
|
||||
[
|
||||
@@ -37,14 +38,18 @@ describe("Vitest project configuration", () => {
|
||||
);
|
||||
const projects = parseProjects(stdout);
|
||||
const parallel = projects.get("parallel") ?? [];
|
||||
const subprocess = projects.get("subprocess") ?? [];
|
||||
const serial = projects.get("serial-integration") ?? [];
|
||||
const repositoryTests = await testFiles("tests");
|
||||
|
||||
expect(serial).toEqual([...SERIAL_INTEGRATION_TESTS].sort());
|
||||
expect(parallel.filter((path) => serial.includes(path))).toEqual([]);
|
||||
expect([...new Set([...parallel, ...serial])].sort()).toEqual(
|
||||
repositoryTests,
|
||||
);
|
||||
expect(subprocess).toEqual([...SUBPROCESS_TESTS].sort());
|
||||
expect(subprocess.filter((path) => serial.includes(path))).toEqual([]);
|
||||
expect(parallel.filter((path) => subprocess.includes(path))).toEqual([]);
|
||||
expect(
|
||||
[...new Set([...parallel, ...subprocess, ...serial])].sort(),
|
||||
).toEqual(repositoryTests);
|
||||
}, 20_000);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user