wheresrhys/fetch-mock

done() not recognised matched requests

thewilkybarkid opened this issue · 1 comments

I have a sandbox with a single getOnce matcher like:

{
  url: 'https://example.com/some-page/',
  query: { foo: 'bar' },
}

When a request to https://example.com/some-page/?foo=bar is made it matches successfully.

However, fetch.done() returns false.

I've been able to work around this by changing the matcher to:

{
  url: 'begin:https://example.com/some-page/?',
  query: { foo: 'bar' },
}

fetch.done() then returns true as expected.