The new Vue 3 implementation of the Universal Language Selector currently has no automated test coverage. MediaWiki core already uses Jest with @vue/test-utils to test equivalent Vue 3 components and composables. We should adopt the same approach here.
Things to add tests for:
Composables
- Language history persistence (load, save, dedup, ordering, size cap).
- Suggested languages (ordering, dedup, filtering against valid codes, territory/browser/config inputs).
- Typeahead suggestion logic (label match, code match, search-hit match, accept behaviour).
- Progressive rendering (initial limit, growth in chunks, cleanup on unmount).
- Country code resolution.
- Entrypoint wiring (correct entrypoints surfaced per mode).
- Keyboard navigation (initial state, next/previous item, highlight selection, visible change)
Entrypoint registry
- Valid registration, type/mode validation, mode restrictions, locking behaviour, retrieval for unknown types.
Components
- see T431386: Add ULS rewrite top-level component test
- Empty-list / empty-search / missing-languages / quick-action entrypoint components render and trigger their handlers.
- The index.js app wrapper: visibility defaults and onSelect/onClose callback wiring.