mirror of
https://github.com/scratchfoundation/scratch-storage.git
synced 2025-06-07 02:45:04 -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
|
// Mimic the cross-fetch module, but replace its `fetch` with `mockFetch` and add a few extras
|
||||||
module.exports = {
|
|
||||||
...crossFetch, // Headers, Request, Response, etc.
|
module.exports = exports = mockFetch;
|
||||||
default: mockFetch,
|
exports.fetch = mockFetch;
|
||||||
fetch: mockFetch,
|
exports.Headers = crossFetch.Headers;
|
||||||
mockFetch,
|
exports.Request = crossFetch.Request;
|
||||||
successText
|
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