| 15 | // Implementing the interface ensures the fake stays in sync with the real API. |
| 16 | // tslint:disable-next-line:no-undecorated-class-with-angular-features lifecycle-hook-interface |
| 17 | @Service() |
| 18 | class FakeDirectionality implements Directionality, OnDestroy { |
| 19 | readonly change: EventEmitter<Direction>; |
| 20 | |
| 21 | get value(): Direction { |
| 22 | return this.valueSignal(); |
| 23 | } |
| 24 | |
| 25 | constructor(readonly valueSignal: WritableSignal<Direction>) { |
| 26 | this.change = toObservable(valueSignal).pipe(skip(1)) as EventEmitter<Direction>; |
| 27 | } |
| 28 | |
| 29 | ngOnDestroy() {} |
| 30 | } |
| 31 | |
| 32 | export function provideFakeDirectionality(direction: Direction | WritableSignal<Direction>) { |
| 33 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected