You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like a bug in all tests that eventually executes query in their call chain: When some expect evaluates to false, the test hangs.
The reason is that on one hand, these test functions get a done argument, while on the other hand, these test functions eventually have an (IIFE) async call (inside query).
Since an exception is thrown when some expect evaluates to false, done is never called in these test functions.
Note the difference between these test functions and (for example) functions that internally call post, which is not async.
I think the solution is to add try-catch to all tests, and make sure done is called.
Seems like a bug in all tests that eventually executes
query
in their call chain: When someexpect
evaluates to false, the test hangs.The reason is that on one hand, these test functions get a
done
argument, while on the other hand, these test functions eventually have an (IIFE)async
call (insidequery
).Since an exception is thrown when some
expect
evaluates to false,done
is never called in these test functions.post
, which is notasync
.I think the solution is to add
try-catch
to all tests, and make suredone
is called.See this related StackOverflow answer: mocha with nodejs assert hangs/timeouts for assert(false) instead of error.
The text was updated successfully, but these errors were encountered: