We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7e76cc commit b44bc9cCopy full SHA for b44bc9c
aio/src/testing/location.service.ts
@@ -0,0 +1,8 @@
1
+import { BehaviorSubject } from 'rxjs/BehaviorSubject';
2
+
3
+export class MockLocationService {
4
+ urlSubject = new BehaviorSubject<string>(this.initialUrl);
5
+ currentUrl = this.urlSubject.asObservable();
6
+ constructor(private initialUrl) {}
7
+}
8
aio/src/testing/logger.service.ts
@@ -0,0 +1,23 @@
+import { Injectable } from '@angular/core';
+@Injectable()
+export class MockLogger {
+ output = {
+ log: [],
+ error: [],
9
+ warn: []
10
+ };
11
12
+ log(value: any, ...rest) {
13
+ this.output.log.push([value, ...rest]);
14
+ }
15
16
+ error(value: any, ...rest) {
17
+ this.output.error.push([value, ...rest]);
18
19
20
+ warn(value: any, ...rest) {
21
+ this.output.warn.push([value, ...rest]);
22
23
0 commit comments