MockDaffOperationStateFacade
Can be used to mock out the DaffOperationStateFacade in testing environments.
import { MockDaffOperationStateFacade } from '@daffodil/core/state/testing'
@Injectable()
class MockDaffOperationStateFacade implements DaffOperationStateFacadeInterface {
loadingState$: BehaviorSubject<DaffState>
loading$: BehaviorSubject<boolean>
resolving$: BehaviorSubject<boolean>
mutating$: BehaviorSubject<boolean>
errors$: BehaviorSubject<DaffStateError[]>
hasErrors$: BehaviorSubject<boolean>
dispatch(action: Action<string>)
}
Properties
Name | Type | Description |
---|---|---|
loadingState$ | BehaviorSubject<DaffState> | The loading state enum. |
loading$ | BehaviorSubject<boolean> | Whether the operation state is in any of the loading states. |
resolving$ | BehaviorSubject<boolean> | Whether the operation state is resolving. |
mutating$ | BehaviorSubject<boolean> | Whether the operation state is mutating. |
errors$ | BehaviorSubject<DaffStateError[]> | The errors in the operation state. |
hasErrors$ | BehaviorSubject<boolean> | Whether the operation state has any errors. If so, it should be considered to be in an "error" state. |
dispatch |