Repository navigation
Test that dispatchers stay reactive with signal-backed context - #5
Merged
Merged
Conversation
Issue #3 can be solved with a signal read by the context provider, because the generated delegate getter reads the context on every call without caching. These tests protect that behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refers to #3 (does not close it). No generator changes: this protects behaviour the generated Angular dispatcher already has.
example/ dispatcher.spec.ts + dispatcher-signals.spec.ts # follows signal + caches, recovers after error, context-free package.json # adds the spec to `npm test`Evidence
npm test: 53 pass. Nothing failed if the delegate was cached.After:
npm test: 56 pass,npm run typecheckclean,npm run generateleaves no diff.delegatetemporarily changed to cache its first result in the generated Angular registry (reverted afterwards), all 3 new tests fail.Merge Danger
Door: two-way
Test-only. Revert the commit to undo it.
Blast Radius: none
src/and the published package are unchanged. A future change that caches the delegate will now fail these tests.