test(core-consent): add missing test coverage and fix diff allowlist

Add symbols.test.ts to cover CONSENT_SYMBOLS constant.
Add recording-consent.test.ts to core-testing (follows the pattern
of all other recording doubles which each have a sibling test file).
Refactor payload-consent.test.ts to extract a makeConsent() helper,
reducing clone groups from 7 to 2.
Add new test to cover grantedAt=null branch in deserializeEntry (withdraw
before any grant → persisted as null → loaded as undefined).
Extend coverage/diff.mjs allowlist for packages/core-testing/ since that
tooling package does not install @vitest/coverage-v8 and therefore produces
no lcov data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 12:48:50 +00:00
parent 7dd46b68b2
commit 500a163e90
6 changed files with 205 additions and 128 deletions

View File

@@ -1,17 +1,17 @@
{
"generatedAt": "2026-05-19T12:37:46.347Z",
"commit": "5792b74",
"generatedAt": "2026-05-19T12:48:28.197Z",
"commit": "7dd46b6",
"repo": {
"statements": 96.55,
"branches": 91.42,
"functions": 96.39,
"lines": 96.55,
"statements": 96.63,
"branches": 91.77,
"functions": 96.74,
"lines": 96.63,
"counts": {
"lf": 4469,
"lh": 4315,
"brf": 874,
"brh": 799,
"fnf": 277,
"lf": 4476,
"lh": 4325,
"brf": 875,
"brh": 803,
"fnf": 276,
"fnh": 267
}
},
@@ -59,16 +59,16 @@
}
},
"@repo/core-consent": {
"statements": 97.87,
"branches": 86.44,
"functions": 91.67,
"lines": 97.87,
"statements": 99.49,
"branches": 91.67,
"functions": 95.65,
"lines": 99.49,
"counts": {
"lf": 188,
"lh": 184,
"brf": 59,
"brh": 51,
"fnf": 24,
"lf": 195,
"lh": 194,
"brf": 60,
"brh": 55,
"fnf": 23,
"fnh": 22
}
},