Skip to content

Commit 9871001

Browse files
committed
fix: add patches for service-worker-mock
1 parent 1840250 commit 9871001

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- node_modules/service-worker-mock/fetch.js 2021-02-18 13:47:55.000000000 -0700
2+
+++ patches/service-worker-mock-fixed.js 2021-02-18 15:49:47.000000000 -0700
3+
@@ -1,8 +1,11 @@
4+
module.exports = async (request) => {
5+
+ const Response = require('./models/Response');
6+
const response = new Response('Response from service-worker-mock/fetch.js', {
7+
status: 200,
8+
statusText: 'ok.'
9+
});
10+
- response.url = request.url;
11+
+ if (request && request.url) {
12+
+ response.url = request.url;
13+
+ }
14+
return response;
15+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- node_modules/service-worker-mock/models/Response.js 2021-02-18 13:47:55.000000000 -0700
2+
+++ patches/service-worker-mock-response.js 2021-02-18 15:57:12.000000000 -0700
3+
@@ -1,5 +1,6 @@
4+
// stubs https://developer.mozilla.org/en-US/docs/Web/API/Response
5+
const Body = require('./Body');
6+
+const Blob = require('./Blob')
7+
const Headers = require('./Headers');
8+
9+
const isSupportedBodyType = (body) =>

0 commit comments

Comments
 (0)