mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 14:26:36 +08:00
0c2961ae6d
Use full country and ISO subdivision data, show localized country names with codes, and add searchable region selection.
24 lines
731 B
TypeScript
24 lines
731 B
TypeScript
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('中国'),
|
|
}),
|
|
);
|
|
});
|
|
});
|