Skip to content

test(composables): add specs for defineLocale, useKbd and useFormField - #262

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-c257686
Jul 10, 2026
Merged

test(composables): add specs for defineLocale, useKbd and useFormField#262
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-c257686

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Syncs upstream nuxt/ui commit c257686test(composables): add specs for defineLocale, useKbd and useFormField (#6701).

What

Test-only — adds three composable specs. All three composables exist in b24ui with matching APIs; two specs needed small fork adaptations:

  • useKbd.spec.ts — verbatim. b24ui's kbdKeysMap and the macOS / non-macOS meta/ctrl/alt resolution match upstream exactly.
  • defineLocale.spec.ts — added locale: 'en' to the fixture. b24ui's DefineLocaleOptions requires a locale field (a fork divergence — every b24ui locale definition passes it); upstream's fixture omits it, which would fail typecheck here.
  • useFormField.spec.ts — the error-state assertion expects air-primary-alert instead of error, because b24ui's useFormField returns that color token on field error. The rest of the API (id/name/size/highlight/disabled fallbacks, ariaAttrs, form events, debounced/deferred input) matches upstream.

Verify (CI=true)

dev:prepare · lint · typecheck · test · build — all green. Suite 5411 passed / 6 skipped (+6 test files, 231→237). No snapshot changes.

Ledger: cursor advanced to c257686; previous entry 5944067 reconciled to PR #261.

🤖 Generated with Claude Code


Generated by Claude Code

…d (c257686)

Port the upstream composable specs. Adapted for b24ui: defineLocale
fixtures pass the required `locale` field, and useFormField's error-state
color assertion expects b24ui's `air-primary-alert` token. useKbd is
verbatim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik
IgorShevchik merged commit 23db1a2 into main Jul 10, 2026
1 check passed
@IgorShevchik
IgorShevchik deleted the sync/nuxt-c257686 branch July 10, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants