mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
16 lines
573 B
JavaScript
16 lines
573 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
|
|
const eventTarget = () => ({addEventListener() {}});
|
|
globalThis.document = {getElementById: eventTarget};
|
|
globalThis.window = eventTarget();
|
|
|
|
const {normalizeSearch} = await import('../dropdown.js');
|
|
|
|
test('dropdown search keeps technical key names locale independent', () => {
|
|
assert.equal('I'.toLocaleLowerCase('tr'), '\u0131');
|
|
assert.equal(normalizeSearch('I'), 'i');
|
|
assert.equal(normalizeSearch('i'), 'i');
|
|
assert.ok(normalizeSearch('KEY:I').includes(normalizeSearch('i')));
|
|
});
|