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 HTTP headers.
- [#zimic] Added support to compare equality and containment of HTTP
headers.
### Fixes
- [#zimic] Fixed the semantics of search param comparisons. Now
`param1.contains(param2)` returns `true` only if all key-value pairs of
`param2` are present in `param1`, regardless of `param1` having more
key-pairs than `param2`. The previous behavior was that
`param1.contains(param2)` would return `true` only if all key-value
pairs of `param1` were present in `param2`, which is not correct because
the semantics are reversed.
```ts
const creationTracker = authInterceptor
.post('/users')
.with({
headers: { 'content-type': 'application/json' },
})
.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);
```
Closes#86.
The text was updated successfully, but these errors were encountered: