You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: address cr round 1 + simplify findings on contract test
cr round 1 (non-blocking) + /simplify findings:
- Extract mockFetch + createClient to src/test-helpers.ts so both
client.test.ts and contract.test.ts import a single fixture.
tsconfig.json excludes the new file from the build output so it
doesn't ship in dist/.
- Regen script: replace the `CONTENT=$(git show …)` capture with a
direct `git show` stream inside the heredoc. Avoids bash command-
substitution's trailing-newline strip and ARG_MAX edges on large
specs.
- Regen script: run `git fetch --quiet origin` before `rev-parse`
so `origin/main` resolves to the live upstream tip rather than
a stale local ref.
- Multi-page listAll contract case: original test asserted only
the first page; the new case mocks two pages and asserts both
calls hit GET /v1/qurls (covers the pagination path properly).
- `assertSdkCallMatches` takes a `callIndex` param for the multi-
page case and guards against a future SDK method calling fetch
without an `init` object (clearer error than a bare access).
- Trim narrative-only comment explaining a lint workaround that
would rot if the rule changed.
- Add CONTRIBUTING note: new public SDK methods require a matching
contract case (alias methods included, so alias rewires can't
silently slip past).
Snapshot-staleness detector (cr round 1 suggestion #3) filed as a
follow-up issue — scope-appropriate since it's a new CI workflow
rather than a change to this test.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0 commit comments