effector / effector/farfetched

createJsonQuery created queries is not mockable via msw

Open
#534 0 comments 0 reactions 0 assignees View on GitHub
scope:core
Dominant language
TypeScript
Stars
221
Forks
36
PR merge metrics
No merged PRs in 30d

Description

### Description
query created by createQuery + fetch works fine (it mocked good)
But query created by createJsonQuery does not mocked for some reason.
```ts
// Error due no handler assigned
Object {
"cause": [TypeError: fetch failed],
"errorType": "NETWORK",
"explanation": "Request was failed due to network problems",
"reason": "fetch failed",
}
```
### Notes
Due to shallow github code exploration internally both queries is use fetch with Request. So i suggest it can be issue with headers passed to queries

### Reproduce
Could not provide reproduce in stackblitz due to problems with msw integration, but here is [github repo](https://github.com/dovranJorayev/vitest-msw-farfetched-bug) that can be connected to codesandbox.io dev container

### Links
[Git reproduce](https://github.com/dovranJorayev/vitest-msw-farfetched-bug)
[Telegram effector group message](https://t.me/effector_ru/377610)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.