From f5b81bbcf02b944ba32c1cede835840bf2696a93 Mon Sep 17 00:00:00 2001 From: Marcel Hoyer Date: Wed, 10 Sep 2014 13:30:02 +0200 Subject: [PATCH] extends should.d.ts to support global 'Should' and 'window.Should' variable for in-browser mode (See https://github.com/visionmedia/should.js/#in-browser) --- should/should-tests.ts | 3 +++ should/should.d.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/should/should-tests.ts b/should/should-tests.ts index e88c6f1447..fafb1d7c74 100644 --- a/should/should-tests.ts +++ b/should/should-tests.ts @@ -39,6 +39,9 @@ should.not.exist(false); should.not.exist(''); should.not.exist({}); +Should.exist(null); +window.Should.exist(null); + user.should.have.property('pets').with.lengthOf(4); user.pets.should.have.lengthOf(4); user.should.be.of.type('object').and.have.property('name', 'tj'); diff --git a/should/should.d.ts b/should/should.d.ts index 8b4c21fc1e..27650cc3f6 100644 --- a/should/should.d.ts +++ b/should/should.d.ts @@ -112,6 +112,10 @@ interface Internal extends ShouldInternal { } declare var should: Internal; +declare var Should: Internal; +interface Window { + Should: Internal; +} declare module "should" { export = should;