We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
withSomeParams
mock
Take the scenario where I have some raw ajax requests that do something like:
await $.ajax({ type, url, data: { foo: 'foo' } }); await $.ajax({ type, url, data: { bar: 'bar' } });
Trying to mock these calls with #withParams like below results in both mocks being called once.
#withParams
let fooMock = mock({url: '/api/post/some-stuff', type}).withParams({ foo: 'foo' }); let barMock = mock({url: '/api/post/some-stuff', type}).withParams({ bar: 'bar' });
But if on the other hand I use withSomeParams only the first mock gets called and the params are ignored.
let fooMock = mock({url: '/api/post/some-stuff', type}).withSomeParams({ foo: 'foo' }); let barMock = mock({url: '/api/post/some-stuff', type}).withSomeParams({ bar: 'bar' });
I've created some failing tests in #382
The text was updated successfully, but these errors were encountered:
FormData
No branches or pull requests
Take the scenario where I have some raw ajax requests that do something like:
Trying to mock these calls with
#withParams
like below results in both mocks being called once.But if on the other hand I use
withSomeParams
only the first mock gets called and the params are ignored.I've created some failing tests in #382
The text was updated successfully, but these errors were encountered: