refactor(aio): switch to pipeable RxJS operators (#22872)
PR Close #22872
This commit is contained in:

committed by
Matias Niemelä

parent
da76db9601
commit
01d2dd2a3a
@ -1,10 +1,11 @@
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
export class MockLocationService {
|
||||
urlSubject = new BehaviorSubject<string>(this.initialUrl);
|
||||
currentUrl = this.urlSubject.asObservable().map(url => this.stripSlashes(url));
|
||||
currentUrl = this.urlSubject.asObservable().pipe(map(url => this.stripSlashes(url)));
|
||||
// strip off query and hash
|
||||
currentPath = this.currentUrl.map(url => url.match(/[^?#]*/)![0]);
|
||||
currentPath = this.currentUrl.pipe(map(url => url.match(/[^?#]*/)![0]));
|
||||
search = jasmine.createSpy('search').and.returnValue({});
|
||||
setSearch = jasmine.createSpy('setSearch');
|
||||
go = jasmine.createSpy('Location.go').and
|
||||
|
Reference in New Issue
Block a user