mirror of
https://github.com/scratchfoundation/scratch-storage.git
synced 2025-05-15 15:40:49 -04:00
fix: fix failing specs
This commit is contained in:
parent
384bac6738
commit
41816e448c
1 changed files with 10 additions and 7 deletions
|
@ -69,10 +69,13 @@ const mockFetch = (resource, options) => {
|
|||
};
|
||||
|
||||
// Mimic the cross-fetch module, but replace its `fetch` with `mockFetch` and add a few extras
|
||||
module.exports = {
|
||||
...crossFetch, // Headers, Request, Response, etc.
|
||||
default: mockFetch,
|
||||
fetch: mockFetch,
|
||||
mockFetch,
|
||||
successText
|
||||
};
|
||||
|
||||
module.exports = exports = mockFetch;
|
||||
exports.fetch = mockFetch;
|
||||
exports.Headers = crossFetch.Headers;
|
||||
exports.Request = crossFetch.Request;
|
||||
exports.Response = crossFetch.Response;
|
||||
exports.successText = successText;
|
||||
|
||||
// Needed for TypeScript consumers without esModuleInterop.
|
||||
exports.default = mockFetch;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue