mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten vitest shard timing assertions
This commit is contained in:
@@ -85,16 +85,18 @@ describe("scripts/lib/vitest-shard-timings.mjs", () => {
|
||||
["test/vitest/vitest.auto-reply-reply.config.ts#auto-reply-reply-agent-runner", 1234],
|
||||
]),
|
||||
);
|
||||
expect(
|
||||
JSON.parse(fs.readFileSync(env.OPENCLAW_TEST_PROJECTS_TIMINGS_PATH, "utf8")).configs[
|
||||
"test/vitest/vitest.auto-reply-reply.config.ts#auto-reply-reply-agent-runner"
|
||||
],
|
||||
).toMatchObject({
|
||||
const persistedTiming = JSON.parse(
|
||||
fs.readFileSync(env.OPENCLAW_TEST_PROJECTS_TIMINGS_PATH, "utf8"),
|
||||
).configs["test/vitest/vitest.auto-reply-reply.config.ts#auto-reply-reply-agent-runner"];
|
||||
expect(typeof persistedTiming.updatedAt).toBe("string");
|
||||
expect(persistedTiming.updatedAt.length).toBeGreaterThan(0);
|
||||
expect({ ...persistedTiming, updatedAt: "<dynamic>" }).toStrictEqual({
|
||||
averageMs: 1234,
|
||||
baseConfig: "test/vitest/vitest.auto-reply-reply.config.ts",
|
||||
includePatternCount: 1,
|
||||
lastMs: 1234,
|
||||
sampleCount: 1,
|
||||
updatedAt: "<dynamic>",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user