Skip to content

Common errors

acadet edited this page Oct 16, 2014 · 1 revision

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

Clone this wiki locally