Common errors - acadet/oscar GitHub Wiki

Here are listed solutions to fix bad stuff that could happen.

Testing sum up is printed multiple times with weird results

It is due to asynchronous issues. You may have defined async tests but without any async content. For instance, you mocked an async method by applying a synchronous behavior.

Solution

Simply simulate an asynchronous method by wrapping your functions in setTimeout(..., 0).