GitHub

MockDaffNavigationFacade

import { MockDaffNavigationFacade } from '@daffodil/navigation/state/testing'

A mock of the DaffNavigationFacade used to remove any interaction with the ngrx store. This mock should be imported into tests using the DaffNavigationStateTestingModule.

@Injectable()
class MockDaffNavigationFacade<<T extends DaffGenericNavigationTree<T>>>  implements DaffNavigationFacadeInterface<T> {
  loading$: BehaviorSubject<boolean> = new BehaviorSubject(false)
  tree$: BehaviorSubject<T> = new BehaviorSubject(null)
  errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([])

  dispatch(action): void
}

() Methods

dispatch
void
Parameters
Parameteraction: undefined
Description