Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 599 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 599 Bytes

@angular-kit/rx-stateful/testing

This package contains some testing utilities for the @angular-kit/rx-stateful package.

Included

  • mockRxStateful- a function that returns a mock of the RxStateful class. It can be used to test components that use the RxStateful class.

Usage

import {mockRxStateful, RxStatefulMock} from '@angular-kit/rx-stateful/testing';
import {HttpErrorResponse} from "@angular/common/http";


const mock = mockRxStateful<string, HttpErrorResponse>()
mock.hasError$Trigger.next(false);
mock.state$Trigger.next({value: 'some', isSuspense: false});