From d1267a71fe137379d5cc7b3edf17ac0cafdb7472 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Wed, 19 Oct 2016 13:43:32 +0100 Subject: [PATCH] Sinon mongoose (#12039) * Added sinon-mongoose.d.ts * Fixed new lines * Renamed tests file --- sinon-mongoose/sinon-mongoose-tests.ts | 6 ++++++ sinon-mongoose/sinon-mongoose.d.ts | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sinon-mongoose/sinon-mongoose-tests.ts create mode 100644 sinon-mongoose/sinon-mongoose.d.ts diff --git a/sinon-mongoose/sinon-mongoose-tests.ts b/sinon-mongoose/sinon-mongoose-tests.ts new file mode 100644 index 0000000000..1d32e25776 --- /dev/null +++ b/sinon-mongoose/sinon-mongoose-tests.ts @@ -0,0 +1,6 @@ +/// +function testChain() { + sinon.stub().chain('exec'); +} + +testChain(); diff --git a/sinon-mongoose/sinon-mongoose.d.ts b/sinon-mongoose/sinon-mongoose.d.ts new file mode 100644 index 0000000000..13e8a3f3a6 --- /dev/null +++ b/sinon-mongoose/sinon-mongoose.d.ts @@ -0,0 +1,18 @@ +// Type definitions for sinon-mongoose v1.3.0 +// Project: https://github.com/underscopeio/sinon-mongoose +// Definitions by: stevehipwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace Sinon { + + export interface SinonStub { + + /** + * When called, the stub will create a new stub to represent a mongoose chained function. + */ + chain(name: string): SinonStub + } + +}