-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### Features - [#zimic] Added support to restrict request trackers by body. ```ts const creationTracker = authInterceptor .post('/users') .with({ body: creationPayload, }) .respond((request) => { const user: User = { id: crypto.randomUUID(), name: request.body.name, email: request.body.email, }; return { status: 201, body: user, }; }); const response = await createUser(creationPayload); expect(response.status).toBe(201); ``` ### Refactoring - [#zimic] Simplified request and response body schemas. - Unified `HttpInterceptorSchema.RequestBody` and `HttpInterceptorSchema.ResponseBody` into `HttpInterceptorSchema.Body`, as the previous `RequestBody` and `ResponseBody` had the same semantics. - [#zimic] Improved HTTP interceptor test scenarios, following real-world cases more closely for each method. Closes #12.
- Loading branch information
1 parent
779fb6f
commit 9e95b20
Showing
19 changed files
with
1,548 additions
and
644 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.