Unit Testing Angular–initializing an object in ngOnInit
Recently I had a problem where in an Angular unit test where I had an object that was being initialized in ngOnInit from a service. As far as I could tell, everything should be working, but the test would fail because I was trying to set a property on the object before it had finished … [Read more…]