While creating tests for the asychornous functions of the Auth Service, I kept having the problem that the test would complete before the service's observable returned. I remedied this by setting a timeout on the 'expect' statements that followed, but there's probably a better way to do this.
You can see this in the AuthComponent.spec file with the comments "Wait for the async tasks to complete. There's probably a better way to do this."
While creating tests for the asychornous functions of the Auth Service, I kept having the problem that the test would complete before the service's observable returned. I remedied this by setting a timeout on the 'expect' statements that followed, but there's probably a better way to do this.
You can see this in the AuthComponent.spec file with the comments "Wait for the async tasks to complete. There's probably a better way to do this."