Home
Using Smart NgRX
Demo Walkthrough
API
@smarttools/smart-ngrx / Function

setState

Generic types:T

Sets the state of the store during unit testing. This grabs the current state and adds the new state to it. If the feature and entity already exist, it will overwrite that state while leaving the rest of the store alone.

Presentation

function setState(feature: string, entity: string, state: T): void;

Returns

void

Parameters

NameTypeDescription
feature
string

the feature to set

entity
string

the entity name to set

state
T

the state to set