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:

committed by
Matias Niemelä

parent
719ca1d23c
commit
aa4d2b785b
@ -110,6 +110,9 @@ export class MockRequest extends MockBody implements Request {
|
|||||||
if (init.credentials !== undefined) {
|
if (init.credentials !== undefined) {
|
||||||
this.credentials = init.credentials;
|
this.credentials = init.credentials;
|
||||||
}
|
}
|
||||||
|
if (init.method !== undefined) {
|
||||||
|
this.method = init.method;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clone(): Request {
|
clone(): Request {
|
||||||
|
Reference in New Issue
Block a user