import { Context } from 'mocha'; import sinon from 'sinon'; /** Callback to be provided to sinonTest */ type Callback = (this: Context, sandbox: sinon.SinonSandbox) => Promise | void; /** * Helper which injects a sinon sandbox into a Mocha callback * * Usage: * ``` * it('Tests the function', sinonTest((sinon) => { * const logger = sinon.stub(dependency, 'logger'); * * const result = testFunction('hello'); * * assert.strictEqual(result, 5); * assert.calledOnceWith(logger, ['hello']); * })); * ``` */ declare function sinonTest(config: Partial | undefined, callback: Callback): (this: Context) => Promise; declare const _default: ((callback: Callback) => (this: Context) => Promise) & { create: typeof sinonTest; }; export { _default as default };