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)

This commit is contained in:
Marcel Hoyer
2014-09-10 13:30:02 +02:00
parent 50dd84eb5d
commit f5b81bbcf0
2 changed files with 7 additions and 0 deletions

View File

@@ -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');

4
should/should.d.ts vendored
View File

@@ -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;