I have a function that subscribes a response from the NGRX store then uses the variable provided to change a message. How do I test that the message changes when the variable updates? getData() { this.service.getPreferences().subscribe(res => { this.mypreference$ = res.mypreference; }); if (this.mypreference$ == false) { (this.mypreferenceType = 'noPreference'); } else { (this.mypreferenceType = 'Preference'); } } getPreferences() { return this.store.select('user').map((state: User) => state); } Continue reading...