Merge pull request #1385 from Runfusion/gsxdsm/fast-tests
perf: speed up test suite across inner loop, full suite, and CI
This commit is contained in:
@@ -276,12 +276,18 @@ describe("Workspace bootstrap script contract", () => {
|
||||
const defaultTest = dashboardPkg.scripts?.test;
|
||||
const defaultAppQuality = dashboardPkg.scripts?.["test:quality:app"];
|
||||
const defaultApiQuality = dashboardPkg.scripts?.["test:quality:api"];
|
||||
const apiCurated = dashboardPkg.scripts?.["test:quality:api:curated"];
|
||||
const deepTest = dashboardPkg.scripts?.["test:deep"];
|
||||
|
||||
expect(defaultTest).toBe("pnpm run test:quality:app && pnpm run test:quality:api");
|
||||
expect(defaultAppQuality).toContain("test:quality:app:foundation-api");
|
||||
expect(defaultAppQuality).toContain("test:quality:app:settings");
|
||||
expect(hasProjectArg(defaultApiQuality, "dashboard-api-quality")).toBe(true);
|
||||
// The api lane chains curated + backfill sub-lanes; the curated sub-lane
|
||||
// carries the explicit quality project, and the backfill lane is the
|
||||
// curated-gate completeness net (broad glob minus curated minus skip-list).
|
||||
expect(defaultApiQuality).toContain("test:quality:api:curated");
|
||||
expect(defaultApiQuality).toContain("test:quality:api:backfill");
|
||||
expect(hasProjectArg(apiCurated, "dashboard-api-quality")).toBe(true);
|
||||
expect(hasProjectArg(defaultTest, "dashboard-app")).toBe(false);
|
||||
expect(hasProjectArg(defaultTest, "dashboard-api")).toBe(false);
|
||||
|
||||
|
||||
@@ -166,7 +166,10 @@ afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
async function waitForFrameContains(lastFrame: () => string | undefined, text: string, timeoutMs = 3000) {
|
||||
// 10s bound: ink schedules frames on timer ticks and has flaked past 3s under
|
||||
// loaded CI shards while passing instantly in isolation. vi.waitFor polls, so
|
||||
// a generous bound adds zero time to passing runs.
|
||||
async function waitForFrameContains(lastFrame: () => string | undefined, text: string, timeoutMs = 10_000) {
|
||||
await vi.waitFor(() => {
|
||||
expect(lastFrame() ?? "").toContain(text);
|
||||
}, { timeout: timeoutMs });
|
||||
|
||||
Reference in New Issue
Block a user