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
This commit is contained in:
Denis Omelkov 2019-11-20 16:28:31 +05:00 committed by Matias Niemelä
parent 3c335c3590
commit 82be6215af
1 changed files with 3 additions and 0 deletions

View File

@ -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 {