test(runtime): cover handleNotification dispatch (ADR-0030)#1488
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Integration coverage for the /api/v1/notifications surface added in #1486: GET → listInbox (with read/limit filters), POST /read → markRead, POST /read/all → markAllRead, 401 for anonymous requests, and unhandled (→404) when no notification service is registered. Mirrors the existing handleAnalytics dispatcher tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c35154f to
7c39006
Compare
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.
Follow-up to #1486. Adds dispatcher-level integration coverage for the
/api/v1/notificationssurface — the one seam #1486 verified only by type-check.Cases (mirroring the existing
handleAnalyticsdispatcher tests):GET /notifications→listInbox(userId, { read, type, limit }), assertsunreadCountin the envelope and the parsedread=false&limit=10filters.POST /notifications/read→markRead(userId, ids)from the body.POST /notifications/read/all→markAllRead(userId).notificationservice registered → unhandled (→ 404).Note: this sandbox SIGKILLs the large-package
tsupDTS builds (@objectstack/specetc.), so I couldn't run the full@objectstack/runtimesuite locally — relying on CI to execute it. The test is constructed to match the provenhandleAnalyticstest harness and thesuccess/errorresponse helpers. The substantive inbox logic is already covered by the 27 passing@objectstack/service-messagingunit tests in #1486.🤖 Generated with Claude Code