nkfoss / ohm-str

0 stars 0 forks source link

Need work-around for 'waiting' during asynchronous tests #50

Closed nkfoss closed 3 years ago

nkfoss commented 4 years ago

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."