Conversation
Adds missing route tests exercising the ky test-server fixture: - things/list: empty list, all created things returned with fields and order, fresh-server isolation - things/delete: removes the targeted thing only, keeps others intact, idempotent success for missing and repeated deletes (documents current ok:true behavior) All requests are awaited (the un-awaited create.test.ts call can race the list assertion). 9/9 tests pass with bun test. Closes #2 Signed-off-by: Furox-Art <Furox-Art@users.noreply.github.com>
Addresses review-pass findings: explicit json<{ok:boolean}> generics on
delete assertions (4 tsc errors), await the create call in
create.test.ts (un-awaited request could race the list assertion) with
response+field assertions, unique thing_id assertion, biome formatting.
Closes #2
Signed-off-by: Furox-Art <Furox-Art@users.noreply.github.com>
Author
|
Withdrawing — the linked bounty (#2) is already marked 💰 Rewarded and has several competing PRs. Closing to keep the queue clean. |
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.
Closes #2
/claim #2
Summary
Adds the missing route test coverage for
things/listandthings/delete,following the established
getTestServer+kyfixture pattern, and fixes theun-awaited create request on the existing test.
New tests —
tests/routes/things/list.test.ts{ things: [] }before anything is createdthing_id/name/descriptionincreation order, and
thing_idvalues are uniqueNew tests —
tests/routes/things/delete.test.tsthing_idmatching, not just count)
thing_idstill returns{ ok: true }and leavesthe list unchanged (documents current idempotent behavior)
Fix —
tests/routes/things/create.test.tsky.postis now awaited (the un-awaited request could race the subsequentlist assertion) and the
{ ok: true }response + created fields areasserted
Notes
new URLSearchParams(...)bodies, matching theapplication/x-www-form-urlencodedcontract of the route spec.json<{ ok: boolean }>()typing sotsc --noEmitstays clean.Verification
bun test tests/routes/→ 9 pass, 0 fail (2 existing + 7 new)tsc --noEmit→ no errors intests/biome formatclean on all touched files