-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with mocking N requests of one type [GET]. #204
Comments
It seems that the issue lies specifically with handling GET parameters. Different links with GET requests are processed successfully, but multiple instances with the same link but different GET parameters are not. However, your problem with the appearance of a fix can be solved by either moving the GET parameters into the URL - export constStandart = {
mockAddonConfigs: {
globalMockData: [
{
url: '/api/currencies',
method: 'GET',
status: 200,
response: ({ searchParams: { page, size }}) => {
...
},
},
],
ignoreQueryParams: true,
disableUsingOriginal: true,
},
}; |
I have a problem with mock requests of the same type. Namely, the data is mocked only for the last request from the mockData array.
In the #64 issue reportedly solved the problem. Am I doing something wrong?
Versions
storybook-addon-mock -4.3.0
Storybook 7.6.5
@nutboltu
The text was updated successfully, but these errors were encountered: