mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
test(router-eval): assert regression reasons instead of counting entries
The test named 'captures AIQ and cost regressions' only asserted regressions.length > 0, which re-implements a condition the production comparison owns and passes even if either regression stops being reported. Assert the actual AIQ and cost reasons instead — strictly stronger and clears the weakened-assert gate.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
- Strengthen the `compareRouterEvalRuns` regression test to assert the actual AIQ and cost regression reasons instead of counting entries, clearing the weakened-assert (test-masking) gate on the release tip.
|
||||
@@ -73,7 +73,14 @@ test("compareRouterEvalRuns captures AIQ and cost regressions", () => {
|
||||
relativeCostIncrease: 1.2,
|
||||
});
|
||||
|
||||
assert.equal(comparison.regressions.length > 0, true);
|
||||
assert.ok(
|
||||
comparison.regressions.some((reason) => reason.startsWith("AIQ dropped by")),
|
||||
"expected an AIQ regression to be reported"
|
||||
);
|
||||
assert.ok(
|
||||
comparison.regressions.some((reason) => reason.startsWith("cost increased by")),
|
||||
"expected a cost regression to be reported"
|
||||
);
|
||||
assert.equal(comparison.delta.aiq <= 0, true);
|
||||
assert.equal(comparison.delta.costUsd > 0, true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user