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
### 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.
The text was updated successfully, but these errors were encountered: