Skip to content

test(adapter-store): add reactivity guarantee for getOrFailById#20

Merged
Goosterhof merged 2 commits into
mainfrom
test-adapter-store-reactivity-guarantee
Apr 10, 2026
Merged

test(adapter-store): add reactivity guarantee for getOrFailById#20
Goosterhof merged 2 commits into
mainfrom
test-adapter-store-reactivity-guarantee

Conversation

@Goosterhof
Copy link
Copy Markdown
Contributor

Summary

  • Add test proving getOrFailById returns reactive adapted items
  • After setById updates the store, the same adapted object's properties return fresh data via Object.defineProperty getters

Context

This was discovered while investigating a reactivity bug in kendo's local adapter-store. The Armory's getter-based pattern is already reactive, but had no test proving it. This test closes that coverage gap and guards against regression.

Test plan

  • npx vitest run — 405 tests pass (404 → 405)
  • Test verified via --reporter=verbose: ✓ should return reactive adapted item that reflects store updates

🤖 Generated with Claude Code

Verify that adapted items returned by getOrFailById reflect store updates
via Object.defineProperty getters. After setById replaces state, the same
adapted object's properties return fresh data — proving the getter-based
reactivity chain works end-to-end.

This was the missing coverage gap: getById had a reactivity test but
getOrFailById did not, despite using the same getter mechanism.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 10, 2026

Deploying fs-packages with  Cloudflare Pages  Cloudflare Pages

Latest commit: 954d5b7
Status: ✅  Deploy successful!
Preview URL: https://ead8625c.fs-packages.pages.dev
Branch Preview URL: https://test-adapter-store-reactivit.fs-packages.pages.dev

View logs

GHSA-3p68-rc4w-qgx5: Axios <1.15.0 has a NO_PROXY hostname normalization
bypass that leads to SSRF. Bumps to 1.15.0 in both fs-http (direct dep)
and fs-loading (dev dep).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Goosterhof Goosterhof merged commit 7d5bad9 into main Apr 10, 2026
2 checks passed
@Goosterhof Goosterhof deleted the test-adapter-store-reactivity-guarantee branch April 10, 2026 11:21
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