test: await ky.post and add delete route test#115
Open
pvbang wants to merge 2 commits into
Open
Conversation
- Fix create.test.ts: await ky.post() call and assert { ok: true } response
- Add delete.test.ts: test create -> verify -> delete -> verify gone flow
- Both tests use ky client properly with await
Closes tscircuit#2
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
Fixes the
kytest coverage for thethingsroutes:create.test.ts: Addedawaittoky.post()call and asserts{ ok: true }response before verifying the created thing appears in the list.delete.test.ts: New test covering the full create → verify → delete → verify gone flow usingkywith URL-encoded form data.Both tests properly use the
kyHTTP client withawait, ensuring reliable test execution.Changes
tests/routes/things/create.test.ts- await ky.post(), assert responsetests/routes/things/delete.test.ts- new delete route testCloses #2
/claim #2
Wallet:
0x911d202f713Ee2ad139E8b8b8a0A712347eFE31f