Skip to content
Docs version
@hungpvq/draggable@1.3.1@hungpvq/vue-draggable@1.3.1@hungpvq/react-draggable@1.3.1

Testing

How @hungpvq/draggable / Vue / React adapters are locked in CI.

Commands

From the monorepo root:

bash
npm run draggable:test          # all packages tagged `draggable` (excl. demos)
npx nx test @hungpvq/draggable
npx nx test @hungpvq/vue-draggable
npx nx test @hungpvq/react-draggable

Release preflight also uses npm run draggable:build (lint + build).

What each layer covers

LayerLocationFocus
Core unitlibs/draggable/core/src/**/*.spec.tsStore (drag:core), factories, bounds, focus/a11y helpers, menu keyboard
Public API lock*/src/public-api.spec.tsRoot runtime exports = Stable ∪ Experimental allowlists
Vue adapterlibs/vue/draggable/src/**/*.spec.tsContainer init, chrome parts (Drag*), hooks, ContextMenu
React adapterlibs/react/draggable/src/**/*.spec.tsxSame contracts as Vue (+ context / reactive store)

There is no Playwright e2e project for demo-draggable yet. Prefer unit + public-api locks; smoke demos with npm run draggable:dev-vue / draggable:dev-react before a release.

When you must update tests

  1. New/removed root runtime export → update that package’s public-api.spec.ts + stable-api.md.
  2. Store / item protocol → extend store/index.spec.ts (notify paths, exclusivity, useDragLayout).
  3. Focus / Escape / menu keyboard → extend utils/focus.spec.ts / utils/menu.spec.ts and note a11y.md.
  4. Internal chrome rename → adapter components.spec should keep covering DragButton / DragHeader / DragCard / DragSidebarToggle (not public exports).

SemVer note

Docs-only and test-only changes are patch on the current published line (<!-- docs-ver:draggable.line -->1.x.x<!-- /docs-ver:draggable.line -->). Changing documented a11y/store behavior needs a SemVer decision — see README checklist.

Next minor prep: releases/v1.2.md. Release flow: npm run draggable:release (scripts/release-group.js).