feat(interceptor): duplicate query calls throw#1630
Conversation
Continuation of nock#1626 BREAKING CHANGE: Attempting to call `Interceptor.query` twice throws an error.
|
Going down the route of properly supporting duplicate keys (which I would consider a bug fix, not a feature) gets into the weeds of the issue that we still use |
tests/test_query.js
Outdated
| @@ -122,16 +122,27 @@ test('query() accepts URLSearchParams as input', async t => { | |||
| }) | |||
|
|
|||
| test('query() throws for duplicate keys', async t => { | |||
There was a problem hiding this comment.
| test('query() throws for duplicate keys', async t => { | |
| test('query() throws if query params have already been defined', async t => { |
tests/test_query.js
Outdated
| ) | ||
| }) | ||
|
|
||
| test('query() throws for invalid arguments', async t => { |
There was a problem hiding this comment.
| test('query() throws for invalid arguments', async t => { | |
| test('query() throws for invalid arguments', t => { |
Will also need a t.end().
|
|
||
| nock(`${url}`, { allowUnmocked: true }) | ||
| .get('/') | ||
| .query(false) |
There was a problem hiding this comment.
Ah, we're removing support for this undocumented feature, correct? Could you update the test title to remove "query false"?
There was a problem hiding this comment.
This test just seems to be a duplicate of the test above now, so I'm going to remove it completely.
|
🎉 This PR is included in version 11.0.0-beta.27 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* feat(interceptor): duplicate query calls throw Continuation of #1626 BREAKING CHANGE: Attempting to call `Interceptor.query` twice throws an error.
* feat(interceptor): duplicate query calls throw Continuation of #1626 BREAKING CHANGE: Attempting to call `Interceptor.query` twice throws an error.
* feat(interceptor): duplicate query calls throw Continuation of #1626 BREAKING CHANGE: Attempting to call `Interceptor.query` twice throws an error.
* feat(interceptor): duplicate query calls throw Continuation of nock#1626 BREAKING CHANGE: Attempting to call `Interceptor.query` twice throws an error.
Continuation of #1626
BREAKING CHANGE: Attempting to call
Interceptor.querytwice throws an error.