Fix Mocha memory/CPU usage
Background
We have increased the timeout for some of our legacy tests (#181 (closed)), but our CI still keeps failing with timeouts (see https://gitlab.com/skipintro/adblockpluscore/-/jobs/510948512). This needs to be addressed at a more fundamental level. It's likely the case that there is a memory leak in the tests.
Sample output from the log above:
1) "before each" hook for "should return 1 for 2.0a1 and 1.1b3"
1883 passing (2m)
1 failing
1) "before each" hook for "should return 1 for 2.0a1 and 1.1b3":
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
What to change
See https://gitlab.com/eyeo/adblockplus/adblockpluscore/-/issues/192#note_339185347
Workarounds: !301 (closed), !302 (closed)
Hints for testers
N/A
/cc @snoack @triluc @hfiguiere
Edited by Manish Jethani