From 49c4b55121a37500b2ec1755d10dff3f22b01380 Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Fri, 11 Dec 2015 08:56:56 +0300 Subject: [PATCH] Release 8.0.1 --- History.md | 5 +++++ package.json | 2 +- should.js | 31 ++++++++++++++++++++----------- should.min.js | 6 +++--- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/History.md b/History.md index 4cb4117..74e1a8d 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,8 @@ +8.0.1 / 2015-12-11 +================== + + * Fix throwing TypeError in .match + 8.0.0 / 2015-12-08 ================== diff --git a/package.json b/package.json index cd5c7fb..19768bf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "should", "description": "test framework agnostic BDD-style assertions", - "version": "8.0.0", + "version": "8.0.1", "author": "TJ Holowaychuk and contributors", "repository": { "type": "git", diff --git a/should.js b/should.js index bd43c7a..9fba096 100644 --- a/should.js +++ b/should.js @@ -1,6 +1,6 @@ /*! * should - test framework agnostic BDD-style assertions - * @version v8.0.0 + * @version v8.0.1 * @author TJ Holowaychuk and contributors * @link https://github.com/shouldjs/should.js * @license MIT @@ -233,7 +233,8 @@ function PromisedAssertion(/* obj */) { /** * Make PromisedAssertion to look like promise. Delegate resolve and reject to given promise. - * + * + * @private * @returns {Promise} */ PromisedAssertion.prototype.then = function(resolve, reject) { @@ -247,6 +248,8 @@ PromisedAssertion.prototype.then = function(resolve, reject) { * All actions happen in subcontext and this method take care about negation. * Potentially we can add some more modifiers that does not depends from state of assertion. * + * @memberOf Assertion + * @static * @param {String} name Name of assertion. It will be used for defining method or getter on Assertion.prototype * @param {Function} func Function that will be called on executing assertion * @example @@ -323,6 +326,9 @@ Assertion.add = function(name, func) { /** * Add chaining getter to Assertion like .a, .which etc + * + * @memberOf Assertion + * @static * @param {string} name name of getter * @param {function} [onCall] optional function to call */ @@ -352,6 +358,8 @@ Assertion.addChain = function(name, onCall) { /** * Create alias for some `Assertion` property * + * @memberOf Assertion + * @static * @param {String} from Name of to map * @param {String} to Name of alias * @example @@ -1298,11 +1306,11 @@ module.exports = function(should, Assertion) { * If `other` is a function check if this function throws AssertionError on given object or return false - it will be assumed as not matched * If `other` is an object check if the same keys matched with above rules * All other cases failed. - * + * * Usually it is right idea to add pre type assertions, like `.String()` or `.Object()` to be sure assertions will do what you are expecting. - * Object iteration happen by keys (properties with enumerable: true), thus some objects can cause small pain. Typical example is js + * Object iteration happen by keys (properties with enumerable: true), thus some objects can cause small pain. Typical example is js * Error - it by default has 2 properties `name` and `message`, but they both non-enumerable. In this case make sure you specify checking props (see examples). - * + * * @name match * @memberOf Assertion * @category assertion matching @@ -1331,17 +1339,17 @@ module.exports = function(should, Assertion) { * .match({ '0': 10, '1': /c$/, '2': function(it) { * return it.should.have.property('d', 10); * }}); - * + * * var myString = 'abc'; - * + * * myString.should.be.a.String().and.match(/abc/); - * + * * myString = {}; - * + * * myString.should.match(/abc/); //yes this will pass * //better to do * myString.should.be.an.Object().and.not.empty().and.match(/abc/);//fixed - * + * * (new Error('boom')).should.match(/abc/);//passed because no keys * (new Error('boom')).should.not.match({ message: /abc/ });//check specified property */ @@ -1386,7 +1394,7 @@ module.exports = function(should, Assertion) { if(typeof res == 'boolean') { this.assert(res); // if it is just boolean function assert on it } - } else if(other != null && typeof other == 'object') { // try to match properties (for Object and Array) + } else if(other != null && this.obj != null && typeof other == 'object') { // try to match properties (for Object and Array) notMatchedProps = []; matchedProps = []; @@ -1693,6 +1701,7 @@ module.exports = function(should) { * @name fulfilled * @memberOf Assertion * @returns {Promise} + * @category assertion promises * @example * (new Promise(function(resolve, reject) { resolve(10); })).should.be.fulfilled() */ diff --git a/should.min.js b/should.min.js index e0974cf..f09afef 100644 --- a/should.min.js +++ b/should.min.js @@ -1,9 +1,9 @@ /*! * should - test framework agnostic BDD-style assertions - * @version v8.0.0 + * @version v8.0.1 * @author TJ Holowaychuk and contributors * @link https://github.com/shouldjs/should.js * @license MIT */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Should=t()}}(function(){return function t(e,r,n){function a(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return a(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}}this.stack=r}}},i=" ";s.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=o.format(this.actual),e="expected"in this?" "+o.format(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",n=this.previous?"\n"+a(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+n}}}),e.exports=s},{"./util":20}],4:[function(t,e,r){function n(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function a(){n.apply(this,arguments)}var o=t("./assertion-error");n.prototype={constructor:n,assert:function(t){if(t)return this;var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,new o(e)},fail:function(){return this.assert(!1)}},a.prototype.then=function(t,e){return this.obj.then(t,e)},n.add=function(t,e){Object.defineProperty(n.prototype,t,{enumerable:!0,configurable:!0,value:function(){var r=new n(this.obj,this,t);r.anyOne=this.anyOne;try{e.apply(r,arguments)}catch(a){if(a instanceof o){if(this.negate)return this.obj=r.obj,this.negate=!1,this;r!==a.assertion&&(r.params.previous=a),r.negate=!1,r.fail()}throw a}return this.negate&&(r.negate=!0,r.params.details="false negative fail",r.fail()),this.params.operator||(this.params=r.params),this.obj=r.obj,this.negate=!1,this}}),Object.defineProperty(a.prototype,t,{enumerable:!0,configurable:!0,value:function(){var e=arguments;return this.obj=this.obj.then(function(r){return r[t].apply(r,e)}),this}})},n.addChain=function(t,e){e=e||function(){},Object.defineProperty(n.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(a.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},n.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(n.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(n.prototype,e,r);var o=Object.getOwnPropertyDescriptor(a.prototype,t);o&&Object.defineProperty(a.prototype,e,o)},n.addChain("not",function(){this.negate=!this.negate}),n.addChain("any",function(){this.anyOne=!0}),e.exports=n,e.exports.PromisedAssertion=a},{"./assertion-error":3}],5:[function(t,e,r){var n=t("should-format").Formatter,a={checkProtoEql:!1,getFormatter:function(t){return new n(t||a)}};e.exports=a},{"should-format":23}],6:[function(t,e,r){function n(t,e,r,a,o){var s=new i(t);s.params={operator:a,expected:e,message:r,stackStartFunction:o||n},s.fail()}function a(t,e){t||n(t,!0,e,"==",h.ok)}function o(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function s(t,e,r,a){var s;"string"==typeof r&&(a=r,r=null);try{e()}catch(i){s=i}if(a=(r&&r.name?" ("+r.name+")":".")+(a?" "+a:"."),t&&!s&&n(s,r,"Missing expected exception"+a),!t&&o(s,r)&&n(s,r,"Got unwanted exception"+a),t&&s&&r&&!o(s,r)||!t&&s)throw s}var i=t("./../assertion"),u=t("should-equal"),c=Array.prototype.slice,h=e.exports=a;h.fail=n,h.ok=a,h.equal=function(t,e,r){t!=e&&n(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&n(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){u(t,e).result||n(t,e,r,"deepEqual",h.deepEqual)},h.notDeepEqual=function(t,e,r){u(t,e).result&&n(t,e,r,"notDeepEqual",h.notDeepEqual)},h.strictEqual=function(t,e,r){t!==e&&n(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&n(t,e,r,"!==",h.notStrictEqual)},h["throws"]=function(t,e,r){s.apply(this,[!0].concat(c.call(arguments)))},h.doesNotThrow=function(t,e){s.apply(this,[!1].concat(c.call(arguments)))},h.ifError=function(t){if(t)throw t}},{"./../assertion":4,"should-equal":22}],7:[function(t,e,r){var n=t("../util"),a=t("./_assert"),o=t("../assertion-error");e.exports=function(t){var e=t.format;n.merge(t,a),t.exist=t.exists=function(r,n){if(null==r)throw new o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":3,"../util":20,"./_assert":6}],8:[function(t,e,r){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)}),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)}),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)})}},{}],9:[function(t,e,r){e.exports=function(t,e){["an","of","a","and","be","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}},{}],10:[function(t,e,r){var n=t("../util"),a=t("should-equal");e.exports=function(t,e){var r=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+r(t)},this.is.not["null"]().and.not.undefined();var e=this.obj;"string"==typeof e?this.assert(e.indexOf(String(t))>=0):n.isIndexable(e)?this.assert(n.some(e,function(e){return a(e,t).result})):this.have.properties(t)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+r(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(n.isIndexable(a)&&n.isIndexable(e)){for(var o=0,s=0,i=n.length(a),u=n.length(e);i>o&&u>s;o++)try{t(a[o]).containDeepOrdered(e[s]),s++}catch(c){if(c instanceof t.AssertionError)continue;throw c}this.assert(s===u)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(n.forEach(e,function(e,r){t(a[r]).containDeepOrdered(e)}),n.isEmptyObject(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+r(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(n.isIndexable(a)&&n.isIndexable(e)){var o={};n.forEach(e,function(e){this.assert(n.some(a,function(r,n){if(n in o)return!1;try{return t(r).containDeep(e),o[n]=!0,!0}catch(a){if(a instanceof t.AssertionError)return!1;throw a}}))},this)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(n.forEach(e,function(e,r){t(a[r]).containDeep(e)}),n.isEmptyObject(e)&&this.eql(e)):this.eql(e)})}},{"../util":20,"should-equal":22}],11:[function(t,e,r){function n(t,e,r){return((t.path.length>0?"at "+t.path.map(s.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+s.format(t.a))+(t.b===r?"":" and B has "+s.format(t.b))+(t.showReason?" because "+t.reason:"")).trim()}var a=t("should-equal"),o=t("should-type"),s=t("../util");e.exports=function(t,e){function r(r,n,a){e.add(r,function(e){1!==arguments.length?e=Array.prototype.slice.call(arguments):t(e).be.Array(),this.params={operator:n,expected:e};var r=this.obj,o=!1;s.forEach(e,function(e){try{return t(e)[a](r),o=!0,!1}catch(n){if(n instanceof t.AssertionError)return;throw n}}),this.assert(o)})}e.add("eql",function(e,r){this.params={operator:"to equal",expected:e,message:r};var s=a(this.obj,e,t.config);this.params.details=s.result?"":n(s,this.obj,e),this.params.showDiff=a(o(this.obj),o(e)).result,this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=a(o(this.obj),o(t)).result,this.assert(t===this.obj)}),e.alias("equal","exactly"),e.alias("eql","deepEqual"),r("equalOneOf","to be equals one of","equal"),r("oneOf","to be one of","eql")}},{"../util":20,"should-equal":22,"should-type":25}],12:[function(t,e,r){var n=t("../util");e.exports=function(t,e){var r=t.format;e.add("throw",function(e,a){var o=this.obj,s={},i="",u=!1;if(n.isGeneratorFunction(o))return t(o())["throw"](e,a);if(n.isGeneratorObject(o))return t(o.next.bind(o))["throw"](e,a);this.is.a.Function();var c=!0;try{o()}catch(h){u=!0,s=h}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(null!=e)try{t(s).match(e)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}if(c){if("function"==typeof e&&a)try{t(s).match(a)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+r(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+n.functionName(e)+", but got "+n.functionName(s.constructor))}else i=" (got "+r(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":20}],13:[function(t,e,r){var n=t("../util"),a=t("should-equal");e.exports=function(t,e){var r=t.format;e.add("match",function(e,o){if(this.params={operator:"to match "+r(e),message:o},!a(this.obj,e).result)if(e instanceof RegExp){if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(n.isIndexable(this.obj))n.forEach(this.obj,function(t){this.assert(e.exec(t))},this);else if(null!=this.obj&&"object"==typeof this.obj){var s=[],i=[];n.forEach(this.obj,function(t,a){e.exec(t)?i.push(n.formatProp(a)):s.push(n.formatProp(a)+" ("+r(t)+")")},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===s.length)}}else if("function"==typeof e){var u;u=e(this.obj),"boolean"==typeof u&&this.assert(u)}else null!=e&&"object"==typeof e?(s=[],i=[],n.forEach(e,function(e,a){try{t(this.obj).have.property(a).which.match(e),i.push(n.formatProp(a))}catch(o){if(!(o instanceof t.AssertionError))throw o;s.push(n.formatProp(a)+" ("+r(this.obj[a])+")")}},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===s.length)):this.assert(!1)}),e.add("matchEach",function(e,a){this.params={operator:"to match each "+r(e),message:a},n.forEach(this.obj,function(r){t(r).match(e)},this)}),e.add("matchAny",function(e,a){this.params={operator:"to match any "+r(e),message:a},this.assert(n.some(this.obj,function(r){try{return t(r).match(e),!0}catch(n){if(n instanceof t.AssertionError)return!1;throw n}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}},{"../util":20,"should-equal":22}],14:[function(t,e,r){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)}),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj))}),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj=t)}),e.add("belowOrEqual",function(t,e){this.params={operator:"to be below or equal"+t,message:e},this.assert(this.obj<=t)}),e.alias("aboveOrEqual","greaterThanOrEqual"),e.alias("belowOrEqual","lessThanOrEqual")}},{}],15:[function(t,e,r){var n=t("../util"),a=t("../assertion").PromisedAssertion,o=t("../assertion");e.exports=function(t){o.add("Promise",function(){this.params={operator:"to be promise"};var e=this.obj;t(e).have.property("then").which.is.a.Function()}),o.prototype.fulfilled=function(){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate&&e.fail(),t},function(t){return e.negate||e.fail(),t})},o.prototype.rejected=function(){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate||e.fail(),t},function(t){return e.negate&&e.fail(),t})},o.prototype.fulfilledWith=function(e){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var r=this;return this.obj.then(function(n){return r.negate&&r.fail(),t(n).eql(e),n},function(t){return r.negate||r.fail(),t})},o.prototype.rejectedWith=function(e,r){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var a=this;return this.obj.then(function(t){return a.negate||a.fail(),t},function(o){a.negate&&a.fail();var s=!0,i="";if("string"==typeof e)s=e===o.message;else if(e instanceof RegExp)s=e.test(o.message);else if("function"==typeof e)s=o instanceof e;else if(null!==e&&"object"==typeof e)try{t(o).match(e)}catch(u){if(!(u instanceof t.AssertionError))throw u;i=": "+u.message,s=!1}if(s){if("function"==typeof e&&r)try{t(o).match(r)}catch(u){if(!(u instanceof t.AssertionError))throw u;i=": "+u.message,s=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+t.format(e)+", but got '"+o.message+"'":"function"==typeof e&&(i=" of type "+n.functionName(e)+", but got "+n.functionName(o.constructor));return a.params.operator+=i,a.assert(s),o})},Object.defineProperty(o.prototype,"finally",{get:function(){t(this.obj).be.a.Promise();var e=this;return new a(this.obj.then(function(r){var n=t(r);return n.negate=e.negate,n.anyOne=e.anyOne,n}))}}),o.alias("finally","eventually")}},{"../assertion":4,"../util":20}],16:[function(t,e,r){var n=t("../util"),a=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){function r(){var t={};if(arguments.length>1)t.names=o.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:n.isIndexable(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}var s=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+s(r)};var n=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(n),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=n.convertPropertyName(t),this.params={operator:"to have enumerable property "+n.formatProp(t)+(arguments.length>1?" equal to "+s(e):"")};var r={enumerable:!0};arguments.length>1&&(r.value=e),this.have.propertyWithDescriptor(t,r)}),e.add("enumerables",function(e){var a=r.apply(null,arguments);this.params={operator:"to have enumerables "+a.names.map(n.formatProp)};var o=this.obj;a.names.forEach(function(e){t(o).have.enumerable(e)})}),e.add("property",function(t,e){if(t=n.convertPropertyName(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var r=Object(this.obj),i=[];t.forEach(function(t){t in r||i.push(n.formatProp(t))});var u=i;0===u.length?u=t.map(n.formatProp):this.anyOne&&(u=t.filter(function(t){return i.indexOf(n.formatProp(t))<0}).map(n.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={obj:this.obj,operator:c},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var h=Object.keys(e);if(h.length){var f=[];u=[],h.forEach(function(t){var o=e[t];a(r[t],o).result?u.push(n.formatProp(t)+" of "+s(o)):f.push(n.formatProp(t)+" of "+s(o)+" (got "+s(r[t])+")")}),(0!==f.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=f),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={obj:this.obj,operator:c},this.assert(0===f.length||this.anyOne&&f.length!=h.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=n.convertPropertyName(t),this.params={actual:this.obj,operator:"to have own property "+n.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},void 0!==n.length(this.obj))t(this.obj).have.property("length",0);else{var e=Object(this.obj);for(var r in e)t(this.obj).not.have.ownProperty(r)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&"string"==typeof t?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),r=[];t.forEach(function(t){i.call(this.obj,t)||r.push(n.formatProp(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(n.formatProp(e))});var s=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:s+t.map(n.formatProp).join(", ")},r.length>0&&(this.params.operator+="\n missing keys: "+r.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===r.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&"string"==typeof e?e=[e]:0===arguments.length&&(e=[]);var r=e.map(n.formatProp);e=e.map(String);for(var a,s=t(Object(this.obj)),i=[];a=e.shift();)this.params={operator:"to have property by path "+r.join(", ")+" - failed on "+n.formatProp(a)},s=s.have.property(a),i.push(a);this.params={obj:this.obj,operator:"to have property by path "+r.join(", ")},this.obj=s.obj})}},{"../util":20,"should-equal":22}],17:[function(t,e,r){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],18:[function(t,e,r){var n=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")}),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have["class"]("Arguments")}),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+n.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.have.type("function")}),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not["null"]().and.have.type("object")}),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")}),e.add("Array",function(){this.params={operator:"to be an array"},this.have["class"]("Array")}),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")}),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)}),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)}),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)}),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()}),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()}),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())})}},{"../util":20}],19:[function(t,e,r){function n(t){return new n.Assertion(t)}var a=t("./util");n.AssertionError=t("./assertion-error"),n.Assertion=t("./assertion"),n.format=a.format,n.type=t("should-type"),n.util=a,n.config=t("./config"),r=e.exports=n,n.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return n(a.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},n.noConflict=function(t){return t=t||n._prevShould,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),n},n.use=function(t){return t(n,n.Assertion),this},n.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain")).use(t("./ext/promise"))},{"./assertion":4,"./assertion-error":3,"./config":5,"./ext/assert":7,"./ext/bool":8,"./ext/chain":9,"./ext/contain":10,"./ext/eql":11,"./ext/error":12,"./ext/match":13,"./ext/number":14,"./ext/promise":15,"./ext/property":16,"./ext/string":17,"./ext/type":18,"./util":20,"should-type":25}],20:[function(t,e,r){var n=t("should-type"),a=t("./config");r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t};var o=Object.prototype.hasOwnProperty;r.forEach=function s(t,e,n){if(r.isGeneratorFunction(t))return s(t(),e,n);if(r.isGeneratorObject(t))for(var a=t.next();!a.done;){if(e.call(n,a.value,"value",t)===!1)return;a=t.next()}else for(var i in t)if(o.call(t,i)&&e.call(n,t[i],i,t)===!1)return},r.some=function(t,e,n){var a=!1;return r.forEach(t,function(r,o){return e.call(n,r,o,t)?(a=!0,!1):void 0},n),a},r.isEmptyObject=function(t){for(var e in t)if(o.call(t,e))return!1;return!0},r.isIndexable=function(t){var e=n(t);return e.type===n.OBJECT&&e.cls===n.ARRAY||e.type===n.OBJECT&&e.cls===n.BUFFER||e.type===n.OBJECT&&e.cls===n.ARGUMENTS||e.type===n.OBJECT&&e.cls===n.ARRAY_BUFFER||e.type===n.OBJECT&&e.cls===n.TYPED_ARRAY||e.type===n.OBJECT&&e.cls===n.DATA_VIEW||e.type===n.OBJECT&&e.cls===n.STRING||e.type===n.STRING},r.length=function(t){var e=n(t);switch(e.type){case n.STRING:return t.length;case n.OBJECT:switch(e.cls){case n.ARRAY_BUFFER:case n.TYPED_ARRAY:case n.DATA_VIEW:return t.byteLength;case n.ARRAY:case n.BUFFER:case n.ARGUMENTS:case n.FUNCTION:return t.length}}},r.convertPropertyName=function(t){return"symbol"==typeof t?t:String(t)},r.isGeneratorObject=function(t){return t?"function"==typeof t.next&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t:!1},r.isGeneratorFunction=function(t){return"function"!=typeof t?!1:/^function\s*\*\s*/.test(t.toString())},r.format=function(t,e){return a.getFormatter(e).format(t)},r.functionName=t("should-format").Formatter.functionName,r.formatProp=function(t){return a.getFormatter().formatPropertyName(String(t))}},{"./config":5,"should-format":23,"should-type":25}],21:[function(t,e,r){e.exports=function(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}},{}],22:[function(t,e,r){function n(t,e,r,n,a){var o={result:t};return t||(o.path=e,o.reason=r,o.a=n,o.b=a),o}function a(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}function o(t,e,r,s,p,l){function d(r,a){return n(r,l,a,t,e)}function m(n){return o(t[n],e[n],r,s,p,l.concat([n]))}var b=h;if(t===e)return d(0!==t||1/t==1/e,f.PLUS_0_AND_MINUS_0);var y,g,j=i(t),v=i(e),E=j.type!==v.type||j.cls!==v.cls;if(E||r.checkSubType&&j.sub!==v.sub||!r.checkSubType)return d(!1,u(f.DIFFERENT_TYPES,a(j),a(v)));switch(j.type){case"number":return t!==t?d(e!==e,f.NAN_NUMBER):0===t?d(1/t===1/e,f.PLUS_0_AND_MINUS_0):d(t===e,f.EQUALITY);case"boolean":case"string":return d(t===e,f.EQUALITY);case"function":var O=t.toString(),A=e.toString();if(b=o(O,A,r,s,p,l),!b.result)return b.reason=f.FUNCTION_SOURCES,b;break;case"object":switch(j.cls){case"regexp":for(g=["source","global","multiline","lastIndex","ignoreCase"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"date":if(+t!==+e)return d(!1,f.EQUALITY);break;case"number":case"boolean":case"string":if(b=o(t.valueOf(),e.valueOf(),r,s,p,l),!b.result)return b.reason=f.WRAPPED_VALUE,b;break;case"buffer":if(b=m("length"),!b.result)return b;for(y=t.length;y--;)if(b=m(y),!b.result)return b;return h;case"error":for(g=["name","message"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"array":case"arguments":case"typed-array":if(b=m("length"),!b.result)return b;break;case"array-buffer":if(b=m("byteLength"),!b.result)return b;break;case"map":case"set":if(b=m("size"),!b.result)return b;s.push(t),p.push(e);for(var x=t.entries(),S=x.next();!S.done;){var P=S.value[0];if("object"!=i(P).type){if(!e.has(P)){b=d(!1,f.SET_MAP_MISSING_KEY),b.a=P,b.b=P;break}if("map"==j.cls){var T=e.get(P);if(b=o(S.value[1],T,r,s,p,l),!b.result){b.a=S.value,b.b=T,b.reason=f.MAP_VALUE_EQUALITY;break}}}else for(var _=e.entries(),N=_.next();!N.done;){if(b=o(S.value[0],N.value[0],r,s,p,l),b.result){"map"==j.cls&&(b=o(S.value[1],N.value[1],r,s,p,l),b.result||(b.a=S.value,b.b=N.value,b.reason=f.MAP_VALUE_EQUALITY));break}b.reason=f.SET_MAP_MISSING_KEY,b.a=P,b.b=P,N=_.next()}if(!b.result)break;S=x.next()}if(s.pop(),p.pop(),!b.result)return b.reason=f.SET_MAP_MISSING_ENTRY,b}}for(y=s.length;y--;)if(s[y]==t)return d(p[y]==e,f.CIRCULAR_VALUES);s.push(t),p.push(e);var P;for(P in e)if(c.call(e,P)){if(b=d(c.call(t,P),u(f.MISSING_KEY,"A",P)),!b.result)break;if(b.result&&(b=m(P),!b.result))break}if(b.result)for(P in t)if(c.call(t,P)&&(b=d(c.call(e,P),u(f.MISSING_KEY,"B",P)),!b.result))return b;if(s.pop(),p.pop(),!b.result)return b;var w=!1,R=!1;return r.checkProtoEql&&(Object.getPrototypeOf?(w=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),R=!0):t.__proto__&&e.__proto__&&(w=t.__proto__===e.__proto__,R=!0),R&&!w&&(b=d(w,f.EQUALITY_PROTOTYPE),b.showReason=!0,!b.result))?b:h}function s(t,e,r){r=r||{},"boolean"!=typeof r.checkProtoEql&&(r.checkProtoEql=p.checkProtoEql),"boolean"!=typeof r.checkSubType&&(r.checkSubType=p.checkSubType);var n=o(t,e,r,[],[],[]);return n}var i=t("should-type"),u=t("./format"),c=Object.prototype.hasOwnProperty,h=n(!0),f={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s has no key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B",SET_MAP_MISSING_KEY:"Set/Map missing key",MAP_VALUE_EQUALITY:"Values of the same key in A and B is not equal"},p={checkProtoEql:!0,checkSubType:!0};e.exports=s,s.r=f},{"./format":21,"should-type":25}],23:[function(t,e,r){function n(t){return function(e){var r=t(e);return r.sort(),r}}function a(t){t=t||{},this.seen=[],this.keys=n(t.keys===!1?Object.getOwnPropertyNames:Object.keys),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}function o(t,e){var r=e?"UTC":"",n=t["get"+r+"FullYear"]()+"-"+u.pad0(t["get"+r+"Month"]()+1,2)+"-"+u.pad0(t["get"+r+"Date"](),2),a=u.pad0(t["get"+r+"Hours"](),2)+":"+u.pad0(t["get"+r+"Minutes"](),2)+":"+u.pad0(t["get"+r+"Seconds"](),2)+"."+u.pad0(t["get"+r+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),i=Math.floor(s/60),c=s-60*i,h=(0>o?"+":"-")+u.pad0(i,2)+u.pad0(c,2);return n+" "+a+(e?"":" "+h)}function s(t,e){return new a(e).format(t)}var i=t("should-type"),u=t("./util");a.prototype={constructor:a,format:function(t){var e=i(t),r=e.type,n=e.type;e.cls&&(r+="_"+e.cls,n+="_"+e.cls),e.sub&&(n+="_"+e.sub);var a=this["_format_"+n]||this["_format_"+r]||this["_format_"+e.type]||this.defaultFormat;return a.call(this,t).trim()},_formatObject:function(t,e){e=e||{};var r=e.keys||this.keys(t),n=0,o=e.formatPropertyValue||this.formatPropertyValue,s=e.formatPropertyName||this.formatPropertyName,i=e.keyValueSep||": ",c=e.keyFilter||function(){return!0};this.seen.push(t);var h=[];r.forEach(function(e){if(c(e)){var r=s.call(this,e),a=(r?r+i:"")+o.call(this,t,e);n+=a.length,h.push(a)}},this),this.seen.pop(),(e.additionalProperties||[]).forEach(function(t){var e=t[0]+i+this.format(t[1]);n+=e.length,h.push(e)},this);var f=e.prefix||a.constructorName(t)||"";f.length>0&&(f+=" ");var p,l;Array.isArray(e.brackets)?(p=e.brackets&&e.brackets[0],l=e.brackets&&e.brackets[1]):(p="{",l="}");var d=e.value||"";return 0===h.length?d||f+p+l:n<=this.maxLineLength?f+p+" "+(d?d+" ":"")+h.join(this.propSep+" ")+" "+l:f+p+"\n"+(d?" "+d+"\n":"")+h.map(u.addSpaces).join(this.propSep+"\n")+"\n"+l},formatObject:function(t,e,r){r=r||this.keys(t);var n=0;return this.seen.push(t),r=r.map(function(e){var r=this.formatProperty(t,e);return n+=r.length,r},this),this.seen.pop(),0===r.length?"{}":n<=this.maxLineLength?"{ "+(e?e+" ":"")+r.join(this.propSep+" ")+" }":"{\n"+(e?" "+e+"\n":"")+r.map(u.addSpaces).join(this.propSep+"\n")+"\n}"},formatPropertyName:function(t){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)},formatProperty:function(t,e){var r=a.getPropertyDescriptor(t,e),n=this.formatPropertyName(e),o=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n+": "+o},formatPropertyValue:function(t,e){var r=a.getPropertyDescriptor(t,e),n=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n}},a.add=function(t,e,r,n){var o=Array.prototype.slice.call(arguments);n=o.pop(),a.prototype["_format_"+o.join("_")]=n},a.formatObjectWithPrefix=function(t){return function(e){var r=t.call(this,e),n=this.keys(e);return 0==n.length?r:this.formatObject(e,r,n)}};var c=/^\s*function\s*(\S*)\s*\(/;a.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(c)[1];return e},a.constructorName=function(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var r=a.functionName(e.value);if(""!==r)return r}t=Object.getPrototypeOf(t)}},a.getPropertyDescriptor=function(t,e){var r;try{r=Object.getOwnPropertyDescriptor(t,e)||{ -value:t[e]}}catch(n){r={value:n}}return r},a.generateFunctionForIndexedArray=function(t,e,r){return function(n){for(var a=this.byteArrayMaxLength||50,o=n[t],s=[],i=0,c=0;a>c&&o>c;c++){var h=n[c]||0,f=u.pad0(h.toString(16),r);i+=f.length,s.push(f)}var p=n.constructor.name||e||"";return p&&(p+=" "),0===s.length?p+"[]":i<=this.maxLineLength?p+"[ "+s.join(this.propSep+" ")+" ]":p+"[\n"+s.map(u.addSpaces).join(this.propSep+"\n")+"\n]"}},a.add("undefined",function(){return"undefined"}),a.add("null",function(){return"null"}),a.add("boolean",function(t){return t?"true":"false"}),a.add("symbol",function(t){return t.toString()}),["number","boolean"].forEach(function(t){a.add("object",t,function(t){return this._formatObject(t,{additionalProperties:[["[[PrimitiveValue]]",t.valueOf()]]})})}),a.add("object","string",function(t){var e=t.valueOf();return this._formatObject(t,{keyFilter:function(t){return!(t.match(/\d+/)&&parseInt(t,10)1/t?"-0":String(t)}),a.add("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),a.add("object",function(t){return this._formatObject(t)}),a.add("object","arguments",function(t){return this._formatObject(t,{prefix:"Arguments",formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","array",function(t){return this._formatObject(t,{formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","date",function(t){return this._formatObject(t,{value:o(t,this.isUTCdate)})}),a.add("function",function(t){return this._formatObject(t,{additionalProperties:[["name",a.functionName(t)]]})}),a.add("object","error",function(t){return this._formatObject(t,{prefix:t.name,additionalProperties:[["message",t.message]]})}),a.add("object","buffer",a.generateFunctionForIndexedArray("length","Buffer",2)),a.add("object","array-buffer",a.generateFunctionForIndexedArray("byteLength","ArrayBuffer",2)),a.add("object","typed-array","int8",a.generateFunctionForIndexedArray("length","Int8Array",2)),a.add("object","typed-array","uint8",a.generateFunctionForIndexedArray("length","Uint8Array",2)),a.add("object","typed-array","uint8clamped",a.generateFunctionForIndexedArray("length","Uint8ClampedArray",2)),a.add("object","typed-array","int16",a.generateFunctionForIndexedArray("length","Int16Array",4)),a.add("object","typed-array","uint16",a.generateFunctionForIndexedArray("length","Uint16Array",4)),a.add("object","typed-array","int32",a.generateFunctionForIndexedArray("length","Int32Array",8)),a.add("object","typed-array","uint32",a.generateFunctionForIndexedArray("length","Uint32Array",8)),a.add("object","promise",function(){return"[Promise]"}),a.add("object","xhr",function(){return"[XMLHttpRequest]"}),a.add("object","html-element",function(t){return t.outerHTML}),a.add("object","html-element","#text",function(t){return t.nodeValue}),a.add("object","html-element","#document",function(t){return t.documentElement.outerHTML}),a.add("object","host",function(){return"[Host]"}),a.add("object","set",function(t){var e=t.values(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o=a.value,s=this.format(o);r+=s.length,n.push(s),a=e.next()}return this.seen.pop(),0===n.length?"Set {}":r<=this.maxLineLength?"Set { "+n.join(this.propSep+" ")+" }":"Set {\n"+n.map(u.addSpaces).join(this.propSep+"\n")+"\n}"}),a.add("object","map",function(t){var e=t.entries(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o,s=a.value,i=this.format(s[0]),c=this.format(s[1]);o=i.length+c.length+4<=this.maxLineLength?i+" => "+c:i+" =>\n"+c,r+=i.length+c.length+4,n.push(o),a=e.next()}return this.seen.pop(),0===n.length?"Map {}":r<=this.maxLineLength?"Map { "+n.join(this.propSep+" ")+" }":"Map {\n"+n.map(u.addSpaces).join(this.propSep+"\n")+"\n}"}),a.prototype.defaultFormat=a.prototype._format_object,s.Formatter=a,e.exports=s},{"./util":24,"should-type":25}],24:[function(t,e,r){function n(t){return t.split("\n").map(function(t){return" "+t}).join("\n")}function a(t,e,r){t=String(t);var n=!1;if(0>e&&(n=!0,e=-e),t.lengthn;n++){var o=this.checks[n].call(this,t,e,r);if("undefined"!=typeof o)return o}}};var u=new a;u.addTypeOf(i.NUMBER,i.NUMBER).addTypeOf(i.UNDEFINED,i.UNDEFINED).addTypeOf(i.STRING,i.STRING).addTypeOf(i.BOOLEAN,i.BOOLEAN).addTypeOf(i.FUNCTION,i.FUNCTION).addTypeOf(i.SYMBOL,i.SYMBOL).add(function(t,e){return null===t?new n(i.NULL):void 0}).addClass("[object String]",i.STRING).addClass("[object Boolean]",i.BOOLEAN).addClass("[object Number]",i.NUMBER).addClass("[object Array]",i.ARRAY).addClass("[object RegExp]",i.REGEXP).addClass("[object Error]",i.ERROR).addClass("[object Date]",i.DATE).addClass("[object Arguments]",i.ARGUMENTS).addClass("[object Math]").addClass("[object JSON]").addClass("[object ArrayBuffer]",i.ARRAY_BUFFER).addClass("[object Int8Array]",i.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",i.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",i.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",i.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",i.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",i.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",i.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",i.TYPED_ARRAY,"float32").addClass("[object Float64Array]",i.TYPED_ARRAY,"float64").addClass("[object DataView]",i.DATA_VIEW).addClass("[object Map]",i.MAP).addClass("[object WeakMap]",i.WEAK_MAP).addClass("[object Set]",i.SET).addClass("[object WeakSet]",i.WEAK_SET).addClass("[object Promise]",i.PROMISE).addClass("[object Blob]",i.BLOB).addClass("[object File]",i.FILE).addClass("[object FileList]",i.FILE_LIST).addClass("[object XMLHttpRequest]",i.XHR).add(function(t){return typeof Promise===i.FUNCTION&&t instanceof Promise||typeof t.then===i.FUNCTION?new n(i.OBJECT,i.PROMISE):void 0}).add(function(t){return"undefined"!=typeof Buffer&&t instanceof Buffer?new n(i.OBJECT,i.BUFFER):void 0}).add(function(t){return"undefined"!=typeof Node&&t instanceof Node?new n(i.OBJECT,i.HTML_ELEMENT,t.nodeName):void 0}).add(function(t){return t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date?new n(i.OBJECT,i.HOST):void 0}).add(function(){return new n(i.OBJECT)}),o.checker=u,o.TypeChecker=a,o.Type=n,Object.keys(i).forEach(function(t){o[t]=i[t]}),e.exports=o},{"./types":26}],26:[function(t,e,r){var n={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",HOST:"host",XHR:"xhr"};e.exports=n},{}]},{},[1])(1)}); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Should=t()}}(function(){return function t(e,r,n){function a(s,i){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!i&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return a(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}}this.stack=r}}},i=" ";s.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=o.format(this.actual),e="expected"in this?" "+o.format(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",n=this.previous?"\n"+a(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+n}}}),e.exports=s},{"./util":20}],4:[function(t,e,r){function n(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function a(){n.apply(this,arguments)}var o=t("./assertion-error");n.prototype={constructor:n,assert:function(t){if(t)return this;var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,new o(e)},fail:function(){return this.assert(!1)}},a.prototype.then=function(t,e){return this.obj.then(t,e)},n.add=function(t,e){Object.defineProperty(n.prototype,t,{enumerable:!0,configurable:!0,value:function(){var r=new n(this.obj,this,t);r.anyOne=this.anyOne;try{e.apply(r,arguments)}catch(a){if(a instanceof o){if(this.negate)return this.obj=r.obj,this.negate=!1,this;r!==a.assertion&&(r.params.previous=a),r.negate=!1,r.fail()}throw a}return this.negate&&(r.negate=!0,r.params.details="false negative fail",r.fail()),this.params.operator||(this.params=r.params),this.obj=r.obj,this.negate=!1,this}}),Object.defineProperty(a.prototype,t,{enumerable:!0,configurable:!0,value:function(){var e=arguments;return this.obj=this.obj.then(function(r){return r[t].apply(r,e)}),this}})},n.addChain=function(t,e){e=e||function(){},Object.defineProperty(n.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(a.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},n.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(n.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(n.prototype,e,r);var o=Object.getOwnPropertyDescriptor(a.prototype,t);o&&Object.defineProperty(a.prototype,e,o)},n.addChain("not",function(){this.negate=!this.negate}),n.addChain("any",function(){this.anyOne=!0}),e.exports=n,e.exports.PromisedAssertion=a},{"./assertion-error":3}],5:[function(t,e,r){var n=t("should-format").Formatter,a={checkProtoEql:!1,getFormatter:function(t){return new n(t||a)}};e.exports=a},{"should-format":23}],6:[function(t,e,r){function n(t,e,r,a,o){var s=new i(t);s.params={operator:a,expected:e,message:r,stackStartFunction:o||n},s.fail()}function a(t,e){t||n(t,!0,e,"==",h.ok)}function o(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function s(t,e,r,a){var s;"string"==typeof r&&(a=r,r=null);try{e()}catch(i){s=i}if(a=(r&&r.name?" ("+r.name+")":".")+(a?" "+a:"."),t&&!s&&n(s,r,"Missing expected exception"+a),!t&&o(s,r)&&n(s,r,"Got unwanted exception"+a),t&&s&&r&&!o(s,r)||!t&&s)throw s}var i=t("./../assertion"),u=t("should-equal"),c=Array.prototype.slice,h=e.exports=a;h.fail=n,h.ok=a,h.equal=function(t,e,r){t!=e&&n(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&n(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){u(t,e).result||n(t,e,r,"deepEqual",h.deepEqual)},h.notDeepEqual=function(t,e,r){u(t,e).result&&n(t,e,r,"notDeepEqual",h.notDeepEqual)},h.strictEqual=function(t,e,r){t!==e&&n(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&n(t,e,r,"!==",h.notStrictEqual)},h["throws"]=function(t,e,r){s.apply(this,[!0].concat(c.call(arguments)))},h.doesNotThrow=function(t,e){s.apply(this,[!1].concat(c.call(arguments)))},h.ifError=function(t){if(t)throw t}},{"./../assertion":4,"should-equal":22}],7:[function(t,e,r){var n=t("../util"),a=t("./_assert"),o=t("../assertion-error");e.exports=function(t){var e=t.format;n.merge(t,a),t.exist=t.exists=function(r,n){if(null==r)throw new o({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new o({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}},{"../assertion-error":3,"../util":20,"./_assert":6}],8:[function(t,e,r){e.exports=function(t,e){e.add("true",function(){this.is.exactly(!0)}),e.alias("true","True"),e.add("false",function(){this.is.exactly(!1)}),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)})}},{}],9:[function(t,e,r){e.exports=function(t,e){["an","of","a","and","be","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}},{}],10:[function(t,e,r){var n=t("../util"),a=t("should-equal");e.exports=function(t,e){var r=t.format;e.add("containEql",function(t){this.params={operator:"to contain "+r(t)},this.is.not["null"]().and.not.undefined();var e=this.obj;"string"==typeof e?this.assert(e.indexOf(String(t))>=0):n.isIndexable(e)?this.assert(n.some(e,function(e){return a(e,t).result})):this.have.properties(t)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+r(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(n.isIndexable(a)&&n.isIndexable(e)){for(var o=0,s=0,i=n.length(a),u=n.length(e);i>o&&u>s;o++)try{t(a[o]).containDeepOrdered(e[s]),s++}catch(c){if(c instanceof t.AssertionError)continue;throw c}this.assert(s===u)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(n.forEach(e,function(e,r){t(a[r]).containDeepOrdered(e)}),n.isEmptyObject(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+r(e)};var a=this.obj;if("string"==typeof a)this.is.equal(String(e));else if(n.isIndexable(a)&&n.isIndexable(e)){var o={};n.forEach(e,function(e){this.assert(n.some(a,function(r,n){if(n in o)return!1;try{return t(r).containDeep(e),o[n]=!0,!0}catch(a){if(a instanceof t.AssertionError)return!1;throw a}}))},this)}else null!=a&&null!=e&&"object"==typeof a&&"object"==typeof e?(n.forEach(e,function(e,r){t(a[r]).containDeep(e)}),n.isEmptyObject(e)&&this.eql(e)):this.eql(e)})}},{"../util":20,"should-equal":22}],11:[function(t,e,r){function n(t,e,r){return((t.path.length>0?"at "+t.path.map(s.formatProp).join(" -> "):"")+(t.a===e?"":", A has "+s.format(t.a))+(t.b===r?"":" and B has "+s.format(t.b))+(t.showReason?" because "+t.reason:"")).trim()}var a=t("should-equal"),o=t("should-type"),s=t("../util");e.exports=function(t,e){function r(r,n,a){e.add(r,function(e){1!==arguments.length?e=Array.prototype.slice.call(arguments):t(e).be.Array(),this.params={operator:n,expected:e};var r=this.obj,o=!1;s.forEach(e,function(e){try{return t(e)[a](r),o=!0,!1}catch(n){if(n instanceof t.AssertionError)return;throw n}}),this.assert(o)})}e.add("eql",function(e,r){this.params={operator:"to equal",expected:e,message:r};var s=a(this.obj,e,t.config);this.params.details=s.result?"":n(s,this.obj,e),this.params.showDiff=a(o(this.obj),o(e)).result,this.assert(s.result)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=a(o(this.obj),o(t)).result,this.assert(t===this.obj)}),e.alias("equal","exactly"),e.alias("eql","deepEqual"),r("equalOneOf","to be equals one of","equal"),r("oneOf","to be one of","eql")}},{"../util":20,"should-equal":22,"should-type":25}],12:[function(t,e,r){var n=t("../util");e.exports=function(t,e){var r=t.format;e.add("throw",function(e,a){var o=this.obj,s={},i="",u=!1;if(n.isGeneratorFunction(o))return t(o())["throw"](e,a);if(n.isGeneratorObject(o))return t(o.next.bind(o))["throw"](e,a);this.is.a.Function();var c=!0;try{o()}catch(h){u=!0,s=h}if(u)if(e){if("string"==typeof e)c=e==s.message;else if(e instanceof RegExp)c=e.test(s.message);else if("function"==typeof e)c=s instanceof e;else if(null!=e)try{t(s).match(e)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}if(c){if("function"==typeof e&&a)try{t(s).match(a)}catch(h){if(!(h instanceof t.AssertionError))throw h;i=": "+h.message,c=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+r(e)+", but got '"+s.message+"'":"function"==typeof e&&(i=" of type "+n.functionName(e)+", but got "+n.functionName(s.constructor))}else i=" (got "+r(s)+")";this.params={operator:"to throw exception"+i},this.assert(u),this.assert(c)}),e.alias("throw","throwError")}},{"../util":20}],13:[function(t,e,r){var n=t("../util"),a=t("should-equal");e.exports=function(t,e){var r=t.format;e.add("match",function(e,o){if(this.params={operator:"to match "+r(e),message:o},!a(this.obj,e).result)if(e instanceof RegExp){if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(n.isIndexable(this.obj))n.forEach(this.obj,function(t){this.assert(e.exec(t))},this);else if(null!=this.obj&&"object"==typeof this.obj){var s=[],i=[];n.forEach(this.obj,function(t,a){e.exec(t)?i.push(n.formatProp(a)):s.push(n.formatProp(a)+" ("+r(t)+")")},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===s.length)}}else if("function"==typeof e){var u;u=e(this.obj),"boolean"==typeof u&&this.assert(u)}else null!=e&&null!=this.obj&&"object"==typeof e?(s=[],i=[],n.forEach(e,function(e,a){try{t(this.obj).have.property(a).which.match(e),i.push(n.formatProp(a))}catch(o){if(!(o instanceof t.AssertionError))throw o;s.push(n.formatProp(a)+" ("+r(this.obj[a])+")")}},this),s.length&&(this.params.operator+="\n not matched properties: "+s.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===s.length)):this.assert(!1)}),e.add("matchEach",function(e,a){this.params={operator:"to match each "+r(e),message:a},n.forEach(this.obj,function(r){t(r).match(e)},this)}),e.add("matchAny",function(e,a){this.params={operator:"to match any "+r(e),message:a},this.assert(n.some(this.obj,function(r){try{return t(r).match(e),!0}catch(n){if(n instanceof t.AssertionError)return!1;throw n}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}},{"../util":20,"should-equal":22}],14:[function(t,e,r){e.exports=function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)}),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj))}),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj=t)}),e.add("belowOrEqual",function(t,e){this.params={operator:"to be below or equal"+t,message:e},this.assert(this.obj<=t)}),e.alias("aboveOrEqual","greaterThanOrEqual"),e.alias("belowOrEqual","lessThanOrEqual")}},{}],15:[function(t,e,r){var n=t("../util"),a=t("../assertion").PromisedAssertion,o=t("../assertion");e.exports=function(t){o.add("Promise",function(){this.params={operator:"to be promise"};var e=this.obj;t(e).have.property("then").which.is.a.Function()}),o.prototype.fulfilled=function(){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate&&e.fail(),t},function(t){return e.negate||e.fail(),t})},o.prototype.rejected=function(){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate||e.fail(),t},function(t){return e.negate&&e.fail(),t})},o.prototype.fulfilledWith=function(e){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var r=this;return this.obj.then(function(n){return r.negate&&r.fail(),t(n).eql(e),n},function(t){return r.negate||r.fail(),t})},o.prototype.rejectedWith=function(e,r){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var a=this;return this.obj.then(function(t){return a.negate||a.fail(),t},function(o){a.negate&&a.fail();var s=!0,i="";if("string"==typeof e)s=e===o.message;else if(e instanceof RegExp)s=e.test(o.message);else if("function"==typeof e)s=o instanceof e;else if(null!==e&&"object"==typeof e)try{t(o).match(e)}catch(u){if(!(u instanceof t.AssertionError))throw u;i=": "+u.message,s=!1}if(s){if("function"==typeof e&&r)try{t(o).match(r)}catch(u){if(!(u instanceof t.AssertionError))throw u;i=": "+u.message,s=!1}}else"string"==typeof e||e instanceof RegExp?i=" with a message matching "+t.format(e)+", but got '"+o.message+"'":"function"==typeof e&&(i=" of type "+n.functionName(e)+", but got "+n.functionName(o.constructor));return a.params.operator+=i,a.assert(s),o})},Object.defineProperty(o.prototype,"finally",{get:function(){t(this.obj).be.a.Promise();var e=this;return new a(this.obj.then(function(r){var n=t(r);return n.negate=e.negate,n.anyOne=e.anyOne,n}))}}),o.alias("finally","eventually")}},{"../assertion":4,"../util":20}],16:[function(t,e,r){var n=t("../util"),a=t("should-equal"),o=Array.prototype.slice;e.exports=function(t,e){function r(){var t={};if(arguments.length>1)t.names=o.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:n.isIndexable(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}var s=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+s(r)};var n=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(n),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=n.convertPropertyName(t),this.params={operator:"to have enumerable property "+n.formatProp(t)+(arguments.length>1?" equal to "+s(e):"")};var r={enumerable:!0};arguments.length>1&&(r.value=e),this.have.propertyWithDescriptor(t,r)}),e.add("enumerables",function(e){var a=r.apply(null,arguments);this.params={operator:"to have enumerables "+a.names.map(n.formatProp)};var o=this.obj;a.names.forEach(function(e){t(o).have.enumerable(e)})}),e.add("property",function(t,e){if(t=n.convertPropertyName(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=o.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var r=Object(this.obj),i=[];t.forEach(function(t){t in r||i.push(n.formatProp(t))});var u=i;0===u.length?u=t.map(n.formatProp):this.anyOne&&(u=t.filter(function(t){return i.indexOf(n.formatProp(t))<0}).map(n.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={obj:this.obj,operator:c},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var h=Object.keys(e);if(h.length){var f=[];u=[],h.forEach(function(t){var o=e[t];a(r[t],o).result?u.push(n.formatProp(t)+" of "+s(o)):f.push(n.formatProp(t)+" of "+s(o)+" (got "+s(r[t])+")")}),(0!==f.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=f),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={obj:this.obj,operator:c},this.assert(0===f.length||this.anyOne&&f.length!=h.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf");var i=Object.prototype.hasOwnProperty;e.add("ownProperty",function(t,e){t=n.convertPropertyName(t),this.params={actual:this.obj,operator:"to have own property "+n.formatProp(t),message:e},this.assert(i.call(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){if(this.params={operator:"to be empty"},void 0!==n.length(this.obj))t(this.obj).have.property("length",0);else{var e=Object(this.obj);for(var r in e)t(this.obj).not.have.ownProperty(r)}},!0),e.add("keys",function(t){arguments.length>1?t=o.call(arguments):1===arguments.length&&"string"==typeof t?t=[t]:0===arguments.length&&(t=[]),t=t.map(String);var e=Object(this.obj),r=[];t.forEach(function(t){i.call(this.obj,t)||r.push(n.formatProp(t))},this);var a=[];Object.keys(e).forEach(function(e){t.indexOf(e)<0&&a.push(n.formatProp(e))});var s=0===t.length?"to be empty":"to have "+(1===t.length?"key ":"keys ");this.params={operator:s+t.map(n.formatProp).join(", ")},r.length>0&&(this.params.operator+="\n missing keys: "+r.join(", ")),a.length>0&&(this.params.operator+="\n extra keys: "+a.join(", ")),this.assert(0===r.length&&0===a.length)}),e.alias("keys","key"),e.add("propertyByPath",function(e){arguments.length>1?e=o.call(arguments):1===arguments.length&&"string"==typeof e?e=[e]:0===arguments.length&&(e=[]);var r=e.map(n.formatProp);e=e.map(String);for(var a,s=t(Object(this.obj)),i=[];a=e.shift();)this.params={operator:"to have property by path "+r.join(", ")+" - failed on "+n.formatProp(a)},s=s.have.property(a),i.push(a);this.params={obj:this.obj,operator:"to have property by path "+r.join(", ")},this.obj=s.obj})}},{"../util":20,"should-equal":22}],17:[function(t,e,r){e.exports=function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}},{}],18:[function(t,e,r){var n=t("../util");e.exports=function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")}),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have["class"]("Arguments")}),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+n.functionName(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.have.type("function")}),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not["null"]().and.have.type("object")}),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")}),e.add("Array",function(){this.params={operator:"to be an array"},this.have["class"]("Array")}),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")}),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)}),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)}),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)}),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()}),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()}),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())})}},{"../util":20}],19:[function(t,e,r){function n(t){return new n.Assertion(t)}var a=t("./util");n.AssertionError=t("./assertion-error"),n.Assertion=t("./assertion"),n.format=a.format,n.type=t("should-type"),n.util=a,n.config=t("./config"),r=e.exports=n,n.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return n(a.isWrapperType(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},n.noConflict=function(t){return t=t||n._prevShould,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),n},n.use=function(t){return t(n,n.Assertion),this},n.use(t("./ext/assert")).use(t("./ext/chain")).use(t("./ext/bool")).use(t("./ext/number")).use(t("./ext/eql")).use(t("./ext/type")).use(t("./ext/string")).use(t("./ext/property")).use(t("./ext/error")).use(t("./ext/match")).use(t("./ext/contain")).use(t("./ext/promise"))},{"./assertion":4,"./assertion-error":3,"./config":5,"./ext/assert":7,"./ext/bool":8,"./ext/chain":9,"./ext/contain":10,"./ext/eql":11,"./ext/error":12,"./ext/match":13,"./ext/number":14,"./ext/promise":15,"./ext/property":16,"./ext/string":17,"./ext/type":18,"./util":20,"should-type":25}],20:[function(t,e,r){var n=t("should-type"),a=t("./config");r.isWrapperType=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean},r.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t};var o=Object.prototype.hasOwnProperty;r.forEach=function s(t,e,n){if(r.isGeneratorFunction(t))return s(t(),e,n);if(r.isGeneratorObject(t))for(var a=t.next();!a.done;){if(e.call(n,a.value,"value",t)===!1)return;a=t.next()}else for(var i in t)if(o.call(t,i)&&e.call(n,t[i],i,t)===!1)return},r.some=function(t,e,n){var a=!1;return r.forEach(t,function(r,o){return e.call(n,r,o,t)?(a=!0,!1):void 0},n),a},r.isEmptyObject=function(t){for(var e in t)if(o.call(t,e))return!1;return!0},r.isIndexable=function(t){var e=n(t);return e.type===n.OBJECT&&e.cls===n.ARRAY||e.type===n.OBJECT&&e.cls===n.BUFFER||e.type===n.OBJECT&&e.cls===n.ARGUMENTS||e.type===n.OBJECT&&e.cls===n.ARRAY_BUFFER||e.type===n.OBJECT&&e.cls===n.TYPED_ARRAY||e.type===n.OBJECT&&e.cls===n.DATA_VIEW||e.type===n.OBJECT&&e.cls===n.STRING||e.type===n.STRING},r.length=function(t){var e=n(t);switch(e.type){case n.STRING:return t.length;case n.OBJECT:switch(e.cls){case n.ARRAY_BUFFER:case n.TYPED_ARRAY:case n.DATA_VIEW:return t.byteLength;case n.ARRAY:case n.BUFFER:case n.ARGUMENTS:case n.FUNCTION:return t.length}}},r.convertPropertyName=function(t){return"symbol"==typeof t?t:String(t)},r.isGeneratorObject=function(t){return t?"function"==typeof t.next&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t:!1},r.isGeneratorFunction=function(t){return"function"!=typeof t?!1:/^function\s*\*\s*/.test(t.toString())},r.format=function(t,e){return a.getFormatter(e).format(t)},r.functionName=t("should-format").Formatter.functionName,r.formatProp=function(t){return a.getFormatter().formatPropertyName(String(t))}},{"./config":5,"should-format":23,"should-type":25}],21:[function(t,e,r){e.exports=function(t){for(var e=arguments,r=1,n=e.length;n>r;r++)t=t.replace(/%s/,e[r]);return t}},{}],22:[function(t,e,r){function n(t,e,r,n,a){var o={result:t};return t||(o.path=e,o.reason=r,o.a=n,o.b=a),o}function a(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}function o(t,e,r,s,p,l){function d(r,a){return n(r,l,a,t,e)}function m(n){return o(t[n],e[n],r,s,p,l.concat([n]))}var b=h;if(t===e)return d(0!==t||1/t==1/e,f.PLUS_0_AND_MINUS_0);var y,g,j=i(t),v=i(e),E=j.type!==v.type||j.cls!==v.cls;if(E||r.checkSubType&&j.sub!==v.sub||!r.checkSubType)return d(!1,u(f.DIFFERENT_TYPES,a(j),a(v)));switch(j.type){case"number":return t!==t?d(e!==e,f.NAN_NUMBER):0===t?d(1/t===1/e,f.PLUS_0_AND_MINUS_0):d(t===e,f.EQUALITY);case"boolean":case"string":return d(t===e,f.EQUALITY);case"function":var O=t.toString(),A=e.toString();if(b=o(O,A,r,s,p,l),!b.result)return b.reason=f.FUNCTION_SOURCES,b;break;case"object":switch(j.cls){case"regexp":for(g=["source","global","multiline","lastIndex","ignoreCase"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"date":if(+t!==+e)return d(!1,f.EQUALITY);break;case"number":case"boolean":case"string":if(b=o(t.valueOf(),e.valueOf(),r,s,p,l),!b.result)return b.reason=f.WRAPPED_VALUE,b;break;case"buffer":if(b=m("length"),!b.result)return b;for(y=t.length;y--;)if(b=m(y),!b.result)return b;return h;case"error":for(g=["name","message"];g.length;)if(b=m(g.shift()),!b.result)return b;break;case"array":case"arguments":case"typed-array":if(b=m("length"),!b.result)return b;break;case"array-buffer":if(b=m("byteLength"),!b.result)return b;break;case"map":case"set":if(b=m("size"),!b.result)return b;s.push(t),p.push(e);for(var x=t.entries(),S=x.next();!S.done;){var P=S.value[0];if("object"!=i(P).type){if(!e.has(P)){b=d(!1,f.SET_MAP_MISSING_KEY),b.a=P,b.b=P;break}if("map"==j.cls){var T=e.get(P);if(b=o(S.value[1],T,r,s,p,l),!b.result){b.a=S.value,b.b=T,b.reason=f.MAP_VALUE_EQUALITY;break}}}else for(var _=e.entries(),N=_.next();!N.done;){if(b=o(S.value[0],N.value[0],r,s,p,l),b.result){"map"==j.cls&&(b=o(S.value[1],N.value[1],r,s,p,l),b.result||(b.a=S.value,b.b=N.value,b.reason=f.MAP_VALUE_EQUALITY));break}b.reason=f.SET_MAP_MISSING_KEY,b.a=P,b.b=P,N=_.next()}if(!b.result)break;S=x.next()}if(s.pop(),p.pop(),!b.result)return b.reason=f.SET_MAP_MISSING_ENTRY,b}}for(y=s.length;y--;)if(s[y]==t)return d(p[y]==e,f.CIRCULAR_VALUES);s.push(t),p.push(e);var P;for(P in e)if(c.call(e,P)){if(b=d(c.call(t,P),u(f.MISSING_KEY,"A",P)),!b.result)break;if(b.result&&(b=m(P),!b.result))break}if(b.result)for(P in t)if(c.call(t,P)&&(b=d(c.call(e,P),u(f.MISSING_KEY,"B",P)),!b.result))return b;if(s.pop(),p.pop(),!b.result)return b;var w=!1,R=!1;return r.checkProtoEql&&(Object.getPrototypeOf?(w=Object.getPrototypeOf(t)===Object.getPrototypeOf(e),R=!0):t.__proto__&&e.__proto__&&(w=t.__proto__===e.__proto__,R=!0),R&&!w&&(b=d(w,f.EQUALITY_PROTOTYPE),b.showReason=!0,!b.result))?b:h}function s(t,e,r){r=r||{},"boolean"!=typeof r.checkProtoEql&&(r.checkProtoEql=p.checkProtoEql),"boolean"!=typeof r.checkSubType&&(r.checkSubType=p.checkSubType);var n=o(t,e,r,[],[],[]);return n}var i=t("should-type"),u=t("./format"),c=Object.prototype.hasOwnProperty,h=n(!0),f={PLUS_0_AND_MINUS_0:"+0 is not equal to -0",DIFFERENT_TYPES:"A has type %s and B has type %s",NAN_NUMBER:"NaN is not equal to any number",EQUALITY:"A is not equal to B",EQUALITY_PROTOTYPE:"A and B have different prototypes",WRAPPED_VALUE:"A wrapped value is not equal to B wrapped value",FUNCTION_SOURCES:"function A is not equal to B by source code value (via .toString call)",MISSING_KEY:"%s has no key %s",CIRCULAR_VALUES:"A has circular reference that was visited not in the same time as B",SET_MAP_MISSING_KEY:"Set/Map missing key",MAP_VALUE_EQUALITY:"Values of the same key in A and B is not equal"},p={checkProtoEql:!0,checkSubType:!0};e.exports=s,s.r=f},{"./format":21,"should-type":25}],23:[function(t,e,r){function n(t){return function(e){var r=t(e);return r.sort(),r}}function a(t){t=t||{},this.seen=[],this.keys=n(t.keys===!1?Object.getOwnPropertyNames:Object.keys),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}function o(t,e){var r=e?"UTC":"",n=t["get"+r+"FullYear"]()+"-"+u.pad0(t["get"+r+"Month"]()+1,2)+"-"+u.pad0(t["get"+r+"Date"](),2),a=u.pad0(t["get"+r+"Hours"](),2)+":"+u.pad0(t["get"+r+"Minutes"](),2)+":"+u.pad0(t["get"+r+"Seconds"](),2)+"."+u.pad0(t["get"+r+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),i=Math.floor(s/60),c=s-60*i,h=(0>o?"+":"-")+u.pad0(i,2)+u.pad0(c,2);return n+" "+a+(e?"":" "+h)}function s(t,e){return new a(e).format(t)}var i=t("should-type"),u=t("./util");a.prototype={constructor:a,format:function(t){var e=i(t),r=e.type,n=e.type;e.cls&&(r+="_"+e.cls,n+="_"+e.cls),e.sub&&(n+="_"+e.sub);var a=this["_format_"+n]||this["_format_"+r]||this["_format_"+e.type]||this.defaultFormat;return a.call(this,t).trim()},_formatObject:function(t,e){e=e||{};var r=e.keys||this.keys(t),n=0,o=e.formatPropertyValue||this.formatPropertyValue,s=e.formatPropertyName||this.formatPropertyName,i=e.keyValueSep||": ",c=e.keyFilter||function(){return!0};this.seen.push(t);var h=[];r.forEach(function(e){if(c(e)){var r=s.call(this,e),a=(r?r+i:"")+o.call(this,t,e);n+=a.length,h.push(a)}},this),this.seen.pop(),(e.additionalProperties||[]).forEach(function(t){var e=t[0]+i+this.format(t[1]);n+=e.length,h.push(e)},this);var f=e.prefix||a.constructorName(t)||"";f.length>0&&(f+=" ");var p,l;Array.isArray(e.brackets)?(p=e.brackets&&e.brackets[0],l=e.brackets&&e.brackets[1]):(p="{",l="}");var d=e.value||"";return 0===h.length?d||f+p+l:n<=this.maxLineLength?f+p+" "+(d?d+" ":"")+h.join(this.propSep+" ")+" "+l:f+p+"\n"+(d?" "+d+"\n":"")+h.map(u.addSpaces).join(this.propSep+"\n")+"\n"+l},formatObject:function(t,e,r){r=r||this.keys(t);var n=0;return this.seen.push(t),r=r.map(function(e){var r=this.formatProperty(t,e);return n+=r.length,r},this),this.seen.pop(),0===r.length?"{}":n<=this.maxLineLength?"{ "+(e?e+" ":"")+r.join(this.propSep+" ")+" }":"{\n"+(e?" "+e+"\n":"")+r.map(u.addSpaces).join(this.propSep+"\n")+"\n}"},formatPropertyName:function(t){return t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)},formatProperty:function(t,e){var r=a.getPropertyDescriptor(t,e),n=this.formatPropertyName(e),o=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n+": "+o},formatPropertyValue:function(t,e){var r=a.getPropertyDescriptor(t,e),n=r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.seen.indexOf(r.value)>=0?"[Circular]":this.format(r.value);return n}},a.add=function(t,e,r,n){var o=Array.prototype.slice.call(arguments);n=o.pop(),a.prototype["_format_"+o.join("_")]=n},a.formatObjectWithPrefix=function(t){return function(e){var r=t.call(this,e),n=this.keys(e);return 0==n.length?r:this.formatObject(e,r,n)}};var c=/^\s*function\s*(\S*)\s*\(/;a.functionName=function(t){if(t.name)return t.name;var e=t.toString().match(c)[1];return e},a.constructorName=function(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var r=a.functionName(e.value);if(""!==r)return r}t=Object.getPrototypeOf(t)}},a.getPropertyDescriptor=function(t,e){var r;try{ +r=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(n){r={value:n}}return r},a.generateFunctionForIndexedArray=function(t,e,r){return function(n){for(var a=this.byteArrayMaxLength||50,o=n[t],s=[],i=0,c=0;a>c&&o>c;c++){var h=n[c]||0,f=u.pad0(h.toString(16),r);i+=f.length,s.push(f)}var p=n.constructor.name||e||"";return p&&(p+=" "),0===s.length?p+"[]":i<=this.maxLineLength?p+"[ "+s.join(this.propSep+" ")+" ]":p+"[\n"+s.map(u.addSpaces).join(this.propSep+"\n")+"\n]"}},a.add("undefined",function(){return"undefined"}),a.add("null",function(){return"null"}),a.add("boolean",function(t){return t?"true":"false"}),a.add("symbol",function(t){return t.toString()}),["number","boolean"].forEach(function(t){a.add("object",t,function(t){return this._formatObject(t,{additionalProperties:[["[[PrimitiveValue]]",t.valueOf()]]})})}),a.add("object","string",function(t){var e=t.valueOf();return this._formatObject(t,{keyFilter:function(t){return!(t.match(/\d+/)&&parseInt(t,10)1/t?"-0":String(t)}),a.add("string",function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),a.add("object",function(t){return this._formatObject(t)}),a.add("object","arguments",function(t){return this._formatObject(t,{prefix:"Arguments",formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","array",function(t){return this._formatObject(t,{formatPropertyName:function(t){return t.match(/\d+/)?void 0:this.formatPropertyName(t)},brackets:["[","]"]})}),a.add("object","date",function(t){return this._formatObject(t,{value:o(t,this.isUTCdate)})}),a.add("function",function(t){return this._formatObject(t,{additionalProperties:[["name",a.functionName(t)]]})}),a.add("object","error",function(t){return this._formatObject(t,{prefix:t.name,additionalProperties:[["message",t.message]]})}),a.add("object","buffer",a.generateFunctionForIndexedArray("length","Buffer",2)),a.add("object","array-buffer",a.generateFunctionForIndexedArray("byteLength","ArrayBuffer",2)),a.add("object","typed-array","int8",a.generateFunctionForIndexedArray("length","Int8Array",2)),a.add("object","typed-array","uint8",a.generateFunctionForIndexedArray("length","Uint8Array",2)),a.add("object","typed-array","uint8clamped",a.generateFunctionForIndexedArray("length","Uint8ClampedArray",2)),a.add("object","typed-array","int16",a.generateFunctionForIndexedArray("length","Int16Array",4)),a.add("object","typed-array","uint16",a.generateFunctionForIndexedArray("length","Uint16Array",4)),a.add("object","typed-array","int32",a.generateFunctionForIndexedArray("length","Int32Array",8)),a.add("object","typed-array","uint32",a.generateFunctionForIndexedArray("length","Uint32Array",8)),a.add("object","promise",function(){return"[Promise]"}),a.add("object","xhr",function(){return"[XMLHttpRequest]"}),a.add("object","html-element",function(t){return t.outerHTML}),a.add("object","html-element","#text",function(t){return t.nodeValue}),a.add("object","html-element","#document",function(t){return t.documentElement.outerHTML}),a.add("object","host",function(){return"[Host]"}),a.add("object","set",function(t){var e=t.values(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o=a.value,s=this.format(o);r+=s.length,n.push(s),a=e.next()}return this.seen.pop(),0===n.length?"Set {}":r<=this.maxLineLength?"Set { "+n.join(this.propSep+" ")+" }":"Set {\n"+n.map(u.addSpaces).join(this.propSep+"\n")+"\n}"}),a.add("object","map",function(t){var e=t.entries(),r=0;this.seen.push(t);for(var n=[],a=e.next();!a.done;){var o,s=a.value,i=this.format(s[0]),c=this.format(s[1]);o=i.length+c.length+4<=this.maxLineLength?i+" => "+c:i+" =>\n"+c,r+=i.length+c.length+4,n.push(o),a=e.next()}return this.seen.pop(),0===n.length?"Map {}":r<=this.maxLineLength?"Map { "+n.join(this.propSep+" ")+" }":"Map {\n"+n.map(u.addSpaces).join(this.propSep+"\n")+"\n}"}),a.prototype.defaultFormat=a.prototype._format_object,s.Formatter=a,e.exports=s},{"./util":24,"should-type":25}],24:[function(t,e,r){function n(t){return t.split("\n").map(function(t){return" "+t}).join("\n")}function a(t,e,r){t=String(t);var n=!1;if(0>e&&(n=!0,e=-e),t.lengthn;n++){var o=this.checks[n].call(this,t,e,r);if("undefined"!=typeof o)return o}}};var u=new a;u.addTypeOf(i.NUMBER,i.NUMBER).addTypeOf(i.UNDEFINED,i.UNDEFINED).addTypeOf(i.STRING,i.STRING).addTypeOf(i.BOOLEAN,i.BOOLEAN).addTypeOf(i.FUNCTION,i.FUNCTION).addTypeOf(i.SYMBOL,i.SYMBOL).add(function(t,e){return null===t?new n(i.NULL):void 0}).addClass("[object String]",i.STRING).addClass("[object Boolean]",i.BOOLEAN).addClass("[object Number]",i.NUMBER).addClass("[object Array]",i.ARRAY).addClass("[object RegExp]",i.REGEXP).addClass("[object Error]",i.ERROR).addClass("[object Date]",i.DATE).addClass("[object Arguments]",i.ARGUMENTS).addClass("[object Math]").addClass("[object JSON]").addClass("[object ArrayBuffer]",i.ARRAY_BUFFER).addClass("[object Int8Array]",i.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",i.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",i.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",i.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",i.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",i.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",i.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",i.TYPED_ARRAY,"float32").addClass("[object Float64Array]",i.TYPED_ARRAY,"float64").addClass("[object DataView]",i.DATA_VIEW).addClass("[object Map]",i.MAP).addClass("[object WeakMap]",i.WEAK_MAP).addClass("[object Set]",i.SET).addClass("[object WeakSet]",i.WEAK_SET).addClass("[object Promise]",i.PROMISE).addClass("[object Blob]",i.BLOB).addClass("[object File]",i.FILE).addClass("[object FileList]",i.FILE_LIST).addClass("[object XMLHttpRequest]",i.XHR).add(function(t){return typeof Promise===i.FUNCTION&&t instanceof Promise||typeof t.then===i.FUNCTION?new n(i.OBJECT,i.PROMISE):void 0}).add(function(t){return"undefined"!=typeof Buffer&&t instanceof Buffer?new n(i.OBJECT,i.BUFFER):void 0}).add(function(t){return"undefined"!=typeof Node&&t instanceof Node?new n(i.OBJECT,i.HTML_ELEMENT,t.nodeName):void 0}).add(function(t){return t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date?new n(i.OBJECT,i.HOST):void 0}).add(function(){return new n(i.OBJECT)}),o.checker=u,o.TypeChecker=a,o.Type=n,Object.keys(i).forEach(function(t){o[t]=i[t]}),e.exports=o},{"./types":26}],26:[function(t,e,r){var n={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",HOST:"host",XHR:"xhr"};e.exports=n},{}]},{},[1])(1)}); \ No newline at end of file