Fix test failures: HMAC length check (P3), fast-check fround (P5)
- P3: timingSafeEqual requires equal-length buffers; add length guard before compare - P5: fast-check fc.float requires 32-bit floats; wrap min with Math.fround() - All 5 Node products: 83 tests passing across 13 test files
This commit is contained in:
@@ -87,7 +87,7 @@ describe('scoreAnomaly', () => {
|
||||
fc.property(
|
||||
fc.float({ min: 0, max: 100, noNaN: true }),
|
||||
fc.float({ min: 0, max: 100, noNaN: true }),
|
||||
fc.float({ min: 0.01, max: 50, noNaN: true }),
|
||||
fc.float({ min: Math.fround(0.01), max: 50, noNaN: true }),
|
||||
(costA, costB, stddev) => {
|
||||
const baseline = { mean: 5.0, stddev };
|
||||
const scoreA = scoreAnomaly({ cost: Math.min(costA, costB), ...baseline });
|
||||
|
||||
Reference in New Issue
Block a user