I have a method which is being called using a d3 timer. Whenever the method is called, the method emits an object with a couple of values.
One of the values in
Try using async function from @angular/core/testing. It
Wraps a test function in an asynchronous test zone. The test will automatically complete when all asynchronous calls within this zone are done. Can be used to wrap an {@link inject} call.
Please find code example below:
it('...', async(inject([AClass], (object) => {
object.doSomething.then(() => {
expect(...);
})
});