mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
719ca1d23c
commit
aa4d2b785b
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue