Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(service-worker): set http method in MockRequest constructor (#…
…33930)

Enable to create mocks for mutating http requests in tests
to check more scenarios.

PR Close #33930
  • Loading branch information
apocalyp0sys authored and matsko committed Nov 22, 2019
1 parent 3c335c3 commit 82be621
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/service-worker/worker/testing/fetch.ts
Expand Up @@ -110,6 +110,9 @@ export class MockRequest extends MockBody implements Request {
if (init.credentials !== undefined) {
this.credentials = init.credentials;
}
if (init.method !== undefined) {
this.method = init.method;
}
}

clone(): Request {
Expand Down

0 comments on commit 82be621

Please sign in to comment.