FIX mocha compatibility in mocks