Bug 1075475 - [CostControl] Fix unit tests with a newer mocha r=salva r=...

...djf
nit: change by `_onerror`. Just for consistency.