From 295a6289b4cec65a6acf429f3737ce5ed783f5df Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Sun, 19 Apr 2026 22:45:34 +0200 Subject: [PATCH] test(config-audit): extend grade-stability test to assert Token Efficiency A/B on baseline --- .../tests/scanners/posture-grade-stability.test.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/config-audit/tests/scanners/posture-grade-stability.test.mjs b/plugins/config-audit/tests/scanners/posture-grade-stability.test.mjs index cbe66d6..be75ff5 100644 --- a/plugins/config-audit/tests/scanners/posture-grade-stability.test.mjs +++ b/plugins/config-audit/tests/scanners/posture-grade-stability.test.mjs @@ -42,4 +42,11 @@ describe('posture grade stability — baseline-all-a', () => { assert.equal(s.counts.high, 0, `${s.scanner} has ${s.counts.high} high findings`); } }); + + it('Token Efficiency area scores grade A or B on baseline', () => { + const te = result.areas.find(a => a.id === 'token_efficiency'); + assert.ok(te, 'expected token_efficiency area to be present'); + assert.ok(['A', 'B'].includes(te.grade), + `Token Efficiency grade is ${te.grade}, expected A or B (score=${te.score})`); + }); });