| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x | import sinon from 'sinon'; function execute(fun, context, args) { return fun.apply(context, args); } function reportError(error) { throw error; } module.exports = { apply: execute, applyWithGuard: execute, guard: sinon.spy(callback => callback), inGuard: sinon.spy(() => true), reportError, setGlobalHandler: sinon.spy(() => undefined) }; |