feat: implement issues #547, #548, #549, #550#563
Open
chizzy192 wants to merge 1 commit into
Open
Conversation
…layerorg#549, accesslayerorg#550 ## Summary Resolves four tracked issues across testing, utilities, and observability. ## Changes ### accesslayerorg#548 – Add parseISOTimestamp helper - Added `InvalidTimestamp` typed error class to `iso-timestamp.utils.ts` - Added `parseISOTimestamp(value: string): Date` that strictly validates ISO 8601 datetime strings (rejects bare dates, Unix timestamp strings, empty strings) and returns a UTC Date object - Extended `iso-timestamp.utils.test.ts` with 8 new unit tests covering all acceptance criteria ### accesslayerorg#547 – Integration test: creator list returns empty array when no creators exist - Added `creator-list-empty-database.integration.test.ts` with 8 tests - Asserts HTTP 200 (not 404), empty `data.items` array, `meta.total === 0`, `meta.hasMore === false` when the DB has no creator records - Uses Jest mocks — no live database required ### accesslayerorg#549 – Integration test: alert registration returns 400 for zero/negative target_price - Added `alert-invalid-target-price.integration.test.ts` with 8 tests - Asserts 400 for `target_price: 0` and `target_price: -1` - Asserts error body identifies the `target_price` field - Asserts `createAlert` is never called (no DB record created) - Uses Jest mocks — no live database required ### accesslayerorg#550 – Structured debug log after every creator list query - Updated `fetchCreatorList` in `creators.utils.ts` to emit a `logger.debug` call after every query resolves - Log fields: `result_count`, `filters` (only active params), `sort`, `query_duration_ms`; cursor is intentionally excluded - Added `creator-list-query-log.test.ts` with 14 unit tests verifying log content, active-only filter keys, cursor absence, and timing Closes accesslayerorg#547 Closes accesslayerorg#548 Closes accesslayerorg#549 Closes accesslayerorg#550
|
@chizzy192 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Resolves four tracked issues across testing, utilities, and observability.
Changes
#548 – Add parseISOTimestamp helper
InvalidTimestamptyped error class toiso-timestamp.utils.tsparseISOTimestamp(value: string): Datethat strictly validates ISO 8601 datetime strings (rejects bare dates, Unix timestamp strings, empty strings) and returns a UTC Date objectiso-timestamp.utils.test.tswith 8 new unit tests covering all acceptance criteria#547 – Integration test: creator list returns empty array when no creators exist
creator-list-empty-database.integration.test.tswith 8 testsdata.itemsarray,meta.total === 0,meta.hasMore === falsewhen the DB has no creator records#549 – Integration test: alert registration returns 400 for zero/negative target_price
alert-invalid-target-price.integration.test.tswith 8 teststarget_price: 0andtarget_price: -1target_pricefieldcreateAlertis never called (no DB record created)#550 – Structured debug log after every creator list query
fetchCreatorListincreators.utils.tsto emit alogger.debugcall after every query resolvesresult_count,filters(only active params),sort,query_duration_ms; cursor is intentionally excludedcreator-list-query-log.test.tswith 14 unit tests verifying log content, active-only filter keys, cursor absence, and timingCloses #547
Closes #548
Closes #549
Closes #550
Summary
Testing
pnpm lintpnpm buildpnpm exec prisma generatewhen schema or generated types changedChecklist