fix(search): no LA comparison for independent schools (H2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e659867590
commit
c7ddf0505d
6 files changed
+87
-6
No files matched your search
@@ -391,3 +391,20 @@ describe('singleSexLabel', () => {
|
||||
expect(singleSexLabel(undefined)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isIndependentSchool', () => {
|
||||
const { isIndependentSchool } = require('@/lib/utils');
|
||||
|
||||
it('matches both GIAS independent types', () => {
|
||||
expect(isIndependentSchool({ school_type: 'Other independent school' })).toBe(true);
|
||||
expect(isIndependentSchool({ school_type: 'Other independent special school' })).toBe(true);
|
||||
});
|
||||
|
||||
it('does not match state-funded types or a missing type', () => {
|
||||
for (const t of ['Academy converter', 'Community school', 'Free schools', 'Non-maintained special school']) {
|
||||
expect(isIndependentSchool({ school_type: t })).toBe(false);
|
||||
}
|
||||
expect(isIndependentSchool({ school_type: null })).toBe(false);
|
||||
expect(isIndependentSchool({})).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user