This commit is contained in:
Andras Schmelczer 2026-06-10 22:25:15 +01:00
parent 1241132095
commit 54a5c3ca9a
28 changed files with 826 additions and 422 deletions

View file

@ -82,18 +82,18 @@ describe('api utilities', () => {
it('deduplicates repeated synthetic school filters before backend routes', () => {
const features: FeatureMeta[] = [
{ name: 'Good+ primary schools within 2km', type: 'numeric', min: 0, max: 10 },
{ name: 'Good+ primary school catchments', type: 'numeric', min: 0, max: 10 },
];
expect(
buildFilterString(
{
[createSchoolFilterKey('primary', 'good', 2, 1)]: [1, 10],
[createSchoolFilterKey('primary', 'good', 2, 2)]: [2, 8],
[createSchoolFilterKey('primary', 'good', 1)]: [1, 10],
[createSchoolFilterKey('primary', 'good', 2)]: [2, 8],
},
features
)
).toBe('Good+ primary schools within 2km:2:8');
).toBe('Good+ primary school catchments:2:8');
});
it('serializes specific crime filters using their selected backend crime feature', () => {