chore: use the API timestamp format in test fixtures - #1049
Merged
Conversation
The API returns timestamps in Postgres text format (2023-10-06 23:47:56.678+00), not ISO 8601. Spec fixtures and inline snapshots showed ISO 8601 for response fields. Convert response fixtures and snapshots to the real format. The HAR recordings already show it: they contain real recorded API traffic. Keep ISO 8601 where the API uses it: the scheduledAt request param (batch.spec.ts, broadcasts.spec.ts:156) and revoked_at in the revoke response (oauth-grants.spec.ts). No runtime changes.
gabrielmfern
approved these changes
Aug 6, 2026
commit: |
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.
What
The API returns timestamps in Postgres text format:
YYYY-MM-DD HH:MM:SS[.ffffff]+00(for example2023-10-06 23:47:56.678+00). Our spec fixtures and inline snapshots showed ISO 8601 for response fields. This PR makes them match the real API output.What stays ISO 8601 on purpose
scheduledAtas a request parameter (batch.spec.ts,broadcasts.spec.ts). The API accepts ISO there.revoked_atin the revoke OAuth grant response (oauth-grants.spec.ts). That endpoint returns ISO.Why
The SDK never parses these values, so there are no runtime changes. But wrong fixtures propagate: new endpoints copy the pattern, and users who read the tests get the wrong contract.
Verification
vitest run src: 1880 passed, 20 todo.tsc --noEmit: clean.biome check src: clean.Summary by cubic
Align test fixtures and inline snapshots with the API’s Postgres timestamp format (
YYYY-MM-DD HH:MM:SS[.ffffff]+00) to match real responses and prevent incorrect contracts. No runtime changes.scheduledAtrequest param andrevoked_atin OAuth revoke.vitest1880 passed,tsc --noEmitclean,biomeclean).Written for commit a4fa39e. Summary will update on new commits.