mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-13 10:26:38 +08:00
fix(waf): complete geography match options
Use full country and ISO subdivision data, show localized country names with codes, and add searchable region selection.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { countryOptions, regionOptions } from './geo-options';
|
||||
|
||||
describe('geo options', () => {
|
||||
it('contains the complete country list with localized names', () => {
|
||||
expect(countryOptions).toHaveLength(249);
|
||||
expect(countryOptions).toContainEqual(
|
||||
expect.objectContaining({ value: 'CN', label: '中国' }),
|
||||
);
|
||||
});
|
||||
|
||||
it('contains searchable ISO subdivision options', () => {
|
||||
expect(regionOptions.length).toBeGreaterThan(4000);
|
||||
expect(regionOptions).toContainEqual(
|
||||
expect.objectContaining({
|
||||
value: 'CN-BJ',
|
||||
label: expect.stringContaining('Beijing'),
|
||||
searchText: expect.stringContaining('中国'),
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user