Skip to content

feat: add ALS-based test scope hooks foundation#14

Merged
Lojhan merged 7 commits into
mainfrom
feat/test-scope-hooks-foundation
Apr 20, 2026
Merged

feat: add ALS-based test scope hooks foundation#14
Lojhan merged 7 commits into
mainfrom
feat/test-scope-hooks-foundation

Conversation

@Lojhan
Copy link
Copy Markdown
Collaborator

@Lojhan Lojhan commented Apr 6, 2026

Summary

  • add a generic ALS-based test scope provider in dom
  • register scope hooks in DOM environment setup (happy-dom and jsdom)
  • export scope API from package index
  • add comprehensive tests for scope lifecycle, cleanup ordering, observer behavior, concurrency isolation, and hook registration

Why

This establishes the plugin-agnostic scope infrastructure needed for per-test state isolation via poku's generic scope-hook contract.

Notes

  • This is foundational wiring in dom; framework packages can now migrate from module-level global sets to per-test slots backed by this scope API.
  • Compatible with poku versions that do not implement scope hooks in core, because core falls back when hooks are absent and registration on dom side is non-breaking.

Validation

  • npm run lint
  • npm test

@Lojhan Lojhan merged commit 80cda0f into main Apr 20, 2026
10 checks passed
@Lojhan Lojhan deleted the feat/test-scope-hooks-foundation branch April 20, 2026 01:51
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.

1 participant