Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

should

Package Overview
Dependencies
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

should - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

5

History.md

@@ -0,1 +1,6 @@

3.3.0 / 2014-04-07
==================
* Added .enumerable(name, val)
3.2.0 / 2014-03-29

@@ -2,0 +7,0 @@ ==================

15

lib/ext/property.js

@@ -15,2 +15,15 @@ /*!

Assertion.add('enumerable', function(name, val) {
this.params = {
operator:"to have enumerable property '"+name+"'"
};
this.assert(this.obj.propertyIsEnumerable(name));
if(arguments.length > 1){
this.params.operator += " equal to '"+val+"'";
this.assert(eql(val, this.obj[name]));
}
});
Assertion.add('property', function(name, val) {

@@ -224,2 +237,2 @@ if(arguments.length > 1) {

};
};

2

package.json
{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "3.2.0",
"version": "3.3.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "repository": {

@@ -35,3 +35,3 @@ # should.js

1. Install it:
```bash

@@ -72,3 +72,3 @@ $ npm install should --save-dev

// the same
// window is host object
// window is host object
should.be.exactly(window);

@@ -150,4 +150,4 @@ // you should not really care about it

*Warning:* No assertions can be done on null and undefined.
e.g.
*Warning:* No assertions can be done on null and undefined.
e.g.
```js

@@ -179,3 +179,3 @@ undefined.should.not.be.ok;

Assert if chained object is *equal* to otherValue. The object is compared by its actual content, not just reference equality.
```javascript

@@ -307,3 +307,14 @@ ({ foo: 'bar' }).should.eql({ foo: 'bar' });

```
## .enumerable(name[, value])
Assert a property exists, is enumerable, and has optional value (compare using `.eql`):
```javascript
'asd'.should.not.have.enumerable('0');
user.should.have.enumerable('name');
user.should.have.enumerable('age', 15);
user.should.not.have.enumerable('rawr');
user.should.not.have.enumerable('age', 0);
[1, 2].should.have.enumerable('0', 1);
```
## .property(name[, value])

@@ -481,3 +492,3 @@

[10, 'abc', { d: 10 }, 0].should
.match([10, /c$/, function(it) { return it.should.have.property('d', 10); }]);
.match([10, /c$/, function(it) { return it.should.have.property('d', 10); }]);
```

@@ -554,3 +565,3 @@

called = true;
//second we test what you want

@@ -569,3 +580,3 @@ res.should.be....

res.should.be....
done();

@@ -572,0 +583,0 @@ });

@@ -1,55 +0,56 @@

!function(C){if("object"==typeof exports)module.exports=C();else if("function"==typeof define&&define.amd)define(C);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.Should=C()}}(function(){return function h(k,e,f){function m(g,a){if(!e[g]){if(!k[g]){var c="function"==typeof require&&require;if(!a&&c)return c(g,!0);if(b)return b(g,!0);throw Error("Cannot find module '"+g+"'");}c=e[g]={exports:{}};k[g][0].call(c.exports,function(a){var l=
k[g][1][a];return m(l?l:a)},c,c.exports,h,k,e,f)}return e[g].exports}for(var b="function"==typeof require&&require,c=0;c<f.length;c++)m(f[c]);return m}({1:[function(h,k,e){e=h("./should");e.use(h("./ext/assert")).use(h("./ext/chain")).use(h("./ext/bool")).use(h("./ext/number")).use(h("./ext/eql")).use(h("./ext/type")).use(h("./ext/string")).use(h("./ext/property")).use(h("./ext/error")).use(h("./ext/match")).use(h("./ext/browser/jquery")).use(h("./ext/deprecated"));k.exports=e},{"./ext/assert":3,
"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(h,k,e){function f(g,a){if(g===a)return!0;if(b.isBuffer(g)&&b.isBuffer(a)){if(g.length!=a.length)return!1;for(var c=0;c<g.length;c++)if(g[c]!==a[c])return!1;return!0}return b.isDate(g)&&b.isDate(a)?g.getTime()===a.getTime():b.isRegExp(g)&&b.isRegExp(a)?g.source===a.source&&g.global===
a.global&&g.multiline===a.multiline&&g.lastIndex===a.lastIndex&&g.ignoreCase===a.ignoreCase:b.isObject(g)||b.isObject(a)?m(g,a):g==a}function m(g,a){if(b.isNullOrUndefined(g)||b.isNullOrUndefined(a)||g.prototype!==a.prototype)return!1;if(b.isArguments(g)){if(!b.isArguments(a))return!1;g=c.call(g);a=c.call(a);return f(g,a)}try{var e=Object.keys(g),d=Object.keys(a),l}catch(p){return!1}if(e.length!=d.length)return!1;e.sort();d.sort();for(l=e.length-1;0<=l;l--)if(e[l]!=d[l])return!1;for(l=e.length-1;0<=
l;l--)if(d=e[l],!f(g[d],a[d]))return!1;return!0}var b=h("./util");k.exports=f;var c=Array.prototype.slice},{"./util":16}],3:[function(h,k,e){var f=h("../util"),m=h("assert"),b=m.AssertionError;k.exports=function(c){var g=c.format;f.merge(c,m);c.exist=c.exists=function(a,f){if(null==a)throw new b({message:f||"expected "+g(a)+" to exist",stackStartFunction:c.exist});};c.not={};c.not.exist=c.not.exists=function(a,f){if(null!=a)throw new b({message:f||"expected "+g(a)+" to not exist",stackStartFunction:c.not.exist});
}}},{"../util":16,assert:17}],4:[function(h,k,e){k.exports=function(f,e){e.add("true",function(){this.is.exactly(!0)},!0);e.add("false",function(){this.is.exactly(!1)},!0);e.add("ok",function(){this.params={operator:"to be truthy"};this.assert(this.obj)},!0)}},{}],5:[function(h,k,e){var f=h("../../util");k.exports=function(e,b){function c(l,d,b,c,e){var q=(f.isObject(c)?Object.keys(c):[c]).reduce(function(d,c){var b=a(this.obj)[l](c);"undefined"!==typeof b&&(d[c]=b);return d}.bind(this),{});4===arguments.length&&
f.isObject(c)?(this.params={operator:"to have "+b+" "+g(c)},q.should.have.properties(c)):4===arguments.length?(this.params={operator:"to have "+d+" "+g(c)},q.should.have.property(c)):(this.params={operator:"to have "+d+" "+g(c)+" with value "+g(e)},q.should.have.property(c,e))}var g=e.format,a=this.jQuery||this.$;"undefined"!==typeof HTMLElement&&HTMLElement&&!HTMLElement.prototype.inspect&&(HTMLElement.prototype.inspect=function(){return this.outerHTML});"undefined"!==typeof jQuery&&jQuery&&!jQuery.prototype.inspect&&
(jQuery.fn.inspect=function(){var a=this.toArray().map(function(a){return f.inspect(a)}).join(", ");return this.selector?"SELECTOR("+this.selector+") matching "+this.length+" elements"+(a.length?": "+a:""):a});var q=function(l){return a("<div/>").append(l).html()},d=function(l,d,c){b.add(d||l,function(){this.params={operator:"to be "+(c||l)};this.assert(a(this.obj).is(":"+l))},!0)};b.add("className",function(l){this.params={operator:"to have class "+l};this.assert(a(this.obj).hasClass(l))});b.add("css",
function(l){this.params={operator:"to have css "+g(l)};for(var d in l){var c=l[d];"auto"===c&&"auto"===a(this.obj).get(0).style[d]||a(this.obj).css(d).should.eql(c)}});d("visible");d("hidden");d("selected");d("checked");d("disabled");d("empty","emptyJq");d("focus","focused","focused");b.add("inDOM",function(){this.params={operator:"to be in the DOM"};this.assert(a.contains(document.documentElement,a(this.obj)[0]))},!0);b.add("exist",function(){this.params={operator:"to exist"};a(this.obj).should.not.have.length(0)},
!0);b.add("attr",function(){var a=["attr","attribute","attributes"].concat(Array.prototype.slice.call(arguments,0));c.apply(this,a)});b.add("prop",function(){var a=["prop","property","properties"].concat(Array.prototype.slice.call(arguments,0));c.apply(this,a)});b.add("elementId",function(a){this.params={operator:"to have ID "+g(a)};this.obj.should.have.attr("id",a)});b.add("html",function(l){this.params={operator:"to have HTML "+g(l)};a(this.obj).html().should.eql(q(l))});b.add("containHtml",function(l){this.params=
{operator:"to contain HTML "+g(l)};a(this.obj).html().indexOf(q(l)).should.be.above(-1)});b.add("text",function(l){this.params={operator:"to have text "+g(l)};var d=a.trim(a(this.obj).text());f.isRegExp(l)?d.should.match(l):d.should.eql(l)});b.add("containText",function(l){this.params={operator:"to contain text "+g(l)};var d=a.trim(a(this.obj).text());f.isRegExp(l)?d.should.match(l):d.indexOf(l).should.be.above(-1)});b.add("value",function(l){this.params={operator:"to have value "+g(l)};a(this.obj).val().should.eql(l)});
b.add("data",function(){var a=["data","data","data"].concat(Array.prototype.slice.call(arguments,0));c.apply(this,a)});b.add("containElement",function(d){this.params={operator:"to contain "+a(d).inspect()};a(this.obj).find(d).should.not.have.length(0)});b.add("matchedBy",function(d){this.params={operator:"to be matched by selector "+d};a(this.obj).filter(d).should.not.have.length(0)});b.add("handle",function(d){this.params={operator:"to handle "+d};var c=a._data(a(this.obj).get(0),"events");if(!c||
!d||"string"!==typeof d)return this.assert(!1);var b=d.split(".");d=b.shift();var g=b.slice(0).sort(),g=RegExp("(^|\\.)"+g.join("\\.(?:.*\\.)?")+"(\\.|$)");if(c[d]&&b.length){for(b=0;b<c[d].length;b++)if(g.test(c[d][b].namespace))return;this.assert(!1)}else c.should.have.property(d),c[d].should.not.have.length(0)});b.add("handleWith",function(d,c){this.params={operator:"to handle "+d+" with "+c};for(var b=d.split(".")[0],b=a._data(a(this.obj).get(0),"events")[b],g=0;g<b.length;g++)if(b[g].handler==
c)return;this.assert(!1)})}},{"../../util":16}],6:[function(h,k,e){k.exports=function(f,e){"an of a and be have with is which the".split(" ").forEach(function(b){Object.defineProperty(e.prototype,b,{get:function(){return this}})})}},{}],7:[function(h,k,e){var f=h("../util"),m=h("../eql");k.exports=function(b,c){var g=b.format;c.add("include",function(a,c){if(Array.isArray(this.obj)||f.isString(this.obj))this.params={operator:"to include "+g(a),message:c},this.assert(~this.obj.indexOf(a));else{this.params=
{operator:"to include an object equal to "+g(a),message:c};var d={},b;for(b in a)d[b]=this.obj[b];this.assert(m(d,a))}});c.add("includeEql",function(a,c){this.params={operator:"to include an object equal to "+g(a),message:c};this.assert(this.obj.some(function(d){return m(a,d)}))})}},{"../eql":2,"../util":16}],8:[function(h,k,e){var f=h("../eql");k.exports=function(e,b){b.add("eql",function(c,b){this.params={operator:"to equal",expected:c,showDiff:!0,message:b};this.assert(f(c,this.obj))});b.add("equal",
function(c,b){this.params={operator:"to be",expected:c,showDiff:!0,message:b};this.assert(c===this.obj)});b.alias("equal","exactly")}},{"../eql":2}],9:[function(h,k,e){k.exports=function(f,e){var b=f.format;e.add("throw",function(c){var g=this.obj,a={},f="",d=!0;try{g(),d=!1}catch(l){a=l}d&&("string"==typeof c?d=c==a.message:c instanceof RegExp?d=c.test(a.message):"function"==typeof c&&(d=a instanceof c),c&&!d?"string"==typeof c?f=" with a message matching '"+c+"', but got '"+a.message+"'":c instanceof
RegExp?f=" with a message matching "+c+", but got '"+a.message+"'":"function"==typeof c&&(f=" of type "+c.name+", but got "+a.constructor.name):f=" (got "+b(a)+")");this.params={operator:"to throw exception"+f};this.assert(d)});e.alias("throw","throwError")}},{}],10:[function(h,k,e){var f=h("../util"),m=h("../eql");k.exports=function(b,c){var g=b.format;c.add("match",function(a,e){this.params={operator:"to match "+g(a),message:e};if(!m(this.obj,a))if(f.isRegExp(a))if(f.isString(this.obj))this.assert(a.exec(this.obj));
else if(Array.isArray(this.obj))this.obj.forEach(function(d){this.assert(a.exec(d))},this);else{if(f.isObject(this.obj)){var d=[],l=[];f.forOwn(this.obj,function(c,b){a.exec(c)?l.push(g(b)):d.push(g(b))},this);d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", "));l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", "));this.assert(0==d.length)}}else if(f.isFunction(a)){var h;try{h=a(this.obj)}catch(k){throw k instanceof b.AssertionError&&(this.params.operator+=
"\n\t"+k.message),k;}h instanceof c&&(this.params.operator+="\n\t"+h.getMessage());f.isBoolean(h)&&this.assert(h)}else f.isObject(a)?(d=[],l=[],f.forOwn(a,function(a,c){try{this.obj[c].should.match(a),l.push(c)}catch(g){if(g instanceof b.AssertionError)d.push(c);else throw g;}},this),d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", ")),l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", ")),this.assert(0==d.length)):this.assert(!1)});c.add("matchEach",function(a,
c){this.params={operator:"to match each "+g(a),message:c};var d=a;f.isRegExp(a)?d=function(d){return!!a.exec(d)}:f.isFunction(a)||(d=function(d){return m(d,a)});f.forOwn(this.obj,function(a,c){var b=d(a,c);f.isBoolean(b)&&this.assert(b)},this)})}},{"../eql":2,"../util":16}],11:[function(h,k,e){k.exports=function(f,e){e.add("NaN",function(){this.params={operator:"to be NaN"};this.assert(this.obj!==this.obj)},!0);e.add("Infinity",function(){this.params={operator:"to be Infinity"};this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},
!0);e.add("within",function(b,c,g){this.params={operator:"to be within "+b+".."+c,message:g};this.assert(this.obj>=b&&this.obj<=c)});e.add("approximately",function(b,c,g){this.params={operator:"to be approximately "+b+" \u00b1"+c,message:g};this.assert(Math.abs(this.obj-b)<=c)});e.add("above",function(b,c){this.params={operator:"to be above "+b,message:c};this.assert(this.obj>b)});e.add("below",function(b,c){this.params={operator:"to be below "+b,message:c};this.assert(this.obj<b)});e.alias("above",
"greaterThan");e.alias("below","lessThan")}},{}],12:[function(h,k,e){var f=h("../util"),m=h("../eql"),b=Array.prototype.slice;k.exports=function(c,g){var a=c.format;g.add("property",function(a,c){if(1<arguments.length){var b={};b[a]=c;this.have.properties(b)}else this.have.properties(a);this.obj=this.obj[a]});g.add("properties",function(d){var c={};1<arguments.length?d=b.call(arguments):Array.isArray(d)||(f.isString(d)?d=[d]:(c=d,d=Object.keys(d)));var g=Object(this.obj),e=[];d.forEach(function(d){d in
g||e.push(a(d))});var h=e;0===h.length?h=d.map(a):this.one&&(h=d.filter(function(d){return 0>e.indexOf(a(d))}).map(a));var k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===e.length||this.one&&e.length!=d.length);var q=Object.keys(c);if(q.length){var r=[],h=[];q.forEach(function(d){var b=c[d];m(g[d],b)?h.push(a(d)+" of "+a(b)):r.push(a(d)+" of "+a(b)+" (got "+a(g[d])+")")});if(0!==r.length&&!this.one||this.one&&
0===h.length)h=r;k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===r.length||this.one&&r.length!=q.length)}});g.add("length",function(a,c){this.have.property("length",a,c)});g.alias("length","lengthOf");var e=Object.prototype.hasOwnProperty;g.add("ownProperty",function(d,c){this.params={operator:"to have own property "+a(d),message:c};this.assert(e.call(this.obj,d));this.obj=this.obj[d]});g.alias("hasOwnProperty",
"ownProperty");g.add("empty",function(){this.params={operator:"to be empty"};if(f.isString(this.obj)||Array.isArray(this.obj)||f.isArguments(this.obj))this.have.property("length",0);else{var a=Object(this.obj),c;for(c in a)this.have.not.ownProperty(c)}},!0);g.add("keys",function(d){1<arguments.length?d=b.call(arguments):1===arguments.length&&f.isString(d)?d=[d]:0===arguments.length&&(d=[]);var c=Object(this.obj),g=[];d.forEach(function(d){e.call(this.obj,d)||g.push(a(d))},this);var h=[];Object.keys(c).forEach(function(c){0>
d.indexOf(c)&&h.push(a(c))});this.params={operator:(0===d.length?"to be empty":"to have "+(1===d.length?"key ":"keys "))+d.map(a).join(", ")};0<g.length&&(this.params.operator+="\n\tmissing keys: "+g.join(", "));0<h.length&&(this.params.operator+="\n\textra keys: "+h.join(", "));this.assert(0===g.length&&0===h.length)});g.alias("keys","key");g.add("containEql",function(c){this.params={operator:"to contain "+a(c)};var b=this.obj;Array.isArray(b)?this.assert(b.some(function(a){return m(a,c)})):f.isString(b)?
this.assert(0<=b.indexOf(String(c))):f.isObject(b)?f.forOwn(c,function(a,c){b.should.have.property(c,a)}):this.assert(!1)});g.add("containDeep",function(d){this.params={operator:"to contain "+a(d)};var b=this.obj;if(Array.isArray(b))if(Array.isArray(d)){var g=0;b.forEach(function(a){try{c(a).not.be.null.and.containDeep(d[g]),g++}catch(b){if(!(b instanceof c.AssertionError))throw b;}});this.assert(g==d.length)}else this.assert(!1);else f.isString(b)?this.assert(0<=b.indexOf(String(d))):f.isObject(b)?
f.isObject(d)?f.forOwn(d,function(a,d){c(b[d]).not.be.null.and.containDeep(a)}):this.assert(!1):this.eql(d)})}},{"../eql":2,"../util":16}],13:[function(h,k,e){k.exports=function(e,h){h.add("startWith",function(b,c){this.params={operator:"to start with "+e.format(b),message:c};this.assert(0===this.obj.indexOf(b))});h.add("endWith",function(b,c){this.params={operator:"to end with "+e.format(b),message:c};this.assert(0<=this.obj.indexOf(b,this.obj.length-b.length))})}},{}],14:[function(h,k,e){var f=
h("../util");k.exports=function(e,b){b.add("Number",function(){this.params={operator:"to be a number"};this.assert(f.isNumber(this.obj))},!0);b.add("arguments",function(){this.params={operator:"to be arguments"};this.assert(f.isArguments(this.obj))},!0);b.add("type",function(c,b){this.params={operator:"to have type "+c,message:b};(typeof this.obj).should.be.exactly(c,b)});b.add("instanceof",function(c,b){this.params={operator:"to be an instance of "+c.name,message:b};this.assert(Object(this.obj)instanceof
c)});b.add("Function",function(){this.params={operator:"to be a function"};this.assert(f.isFunction(this.obj))},!0);b.add("Object",function(){this.params={operator:"to be an object"};this.assert(f.isObject(this.obj))},!0);b.add("String",function(){this.params={operator:"to be a string"};this.assert(f.isString(this.obj))},!0);b.add("Array",function(){this.params={operator:"to be an array"};this.assert(Array.isArray(this.obj))},!0);b.add("Boolean",function(){this.params={operator:"to be a boolean"};
this.assert(f.isBoolean(this.obj))},!0);b.add("Error",function(){this.params={operator:"to be an error"};this.assert(f.isError(this.obj))},!0);b.add("null",function(){this.params={operator:"to be null"};this.assert(null===this.obj)},!0);b.alias("instanceof","instanceOf")}},{"../util":16}],15:[function(h,k,e){var f=h("./util"),m=f.AssertionError,b=f.inspect,c=function(a){return new g(f.isWrapperType(a)?a.valueOf():a)},g=c.Assertion=function(a){this.obj=a};g.add=function(a,b,e){var f={};f[e?"get":"value"]=
function(){var a=new g(this.obj);a.copy=a.copyIfMissing;a.one=this.one;try{b.apply(a,arguments)}catch(e){this.copy(a);if(e instanceof c.AssertionError){if(this.negate)return this.obj=a.obj,this.negate=!1,this;this.assert(!1)}throw e;}this.copy(a);this.negate&&this.assert(!1);this.obj=a.obj;this.negate=!1;return this};Object.defineProperty(g.prototype,a,f)};g.alias=function(a,b){g.prototype[b]=g.prototype[a]};c.AssertionError=m;var a=c.format=function(a){return f.isDate(a)&&"function"!==typeof a.inspect?
a.toISOString():b(a,{depth:null})};c.use=function(a){a(this,g);return this};k.exports=c;Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return c(this)},configurable:!0});g.prototype={constructor:g,assert:function(a){if(!a){a=this.params;var b=a.message,c=!1;b||(b=this.getMessage(),c=!0);b=new m({message:b,actual:this.obj,expected:a.expected,stackStartFunction:this.assert});b.showDiff=a.showDiff;b.operator=a.operator;b.generatedMessage=c;throw b;}},getMessage:function(){return"expected "+
("obj"in this.params?this.params.obj:a(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+a(this.params.expected):"")},copy:function(a){this.params=a.params},copyIfMissing:function(a){this.params||(this.params=a.params)},get not(){this.negate=!this.negate;return this},get any(){this.one=!0;return this}}},{"./util":16}],16:[function(h,k,e){function f(a){return"number"===typeof a||a instanceof Number}function m(a){return"string"===typeof a||a instanceof String}function b(a){return"boolean"===
typeof a||a instanceof Boolean}function c(a){return"object"===typeof a&&null!==a}e.isWrapperType=function(a){return f(a)||m(a)||b(a)};e.merge=function(a,b){if(a&&b)for(var c in b)a[c]=b[c];return a};e.isNumber=f;e.isBoolean=b;e.isString=m;e.isBuffer=function(a){return"undefined"!==typeof Buffer&&a instanceof Buffer};e.isDate=function(a){return c(a)&&"[object Date]"===Object.prototype.toString.call(a)};e.isObject=c;e.isRegExp=function(a){return c(a)&&"[object RegExp]"===Object.prototype.toString.call(a)};
e.isNullOrUndefined=function(a){return null==a};e.isArguments=function(a){return"[object Arguments]"===Object.prototype.toString.call(a)};e.isFunction=function(a){return"function"===typeof a||a instanceof Function};e.isError=function(a){return c(a)&&"[object Error]"===Object.prototype.toString.call(a)||a instanceof Error};e.inspect=h("util").inspect;e.AssertionError=h("assert").AssertionError;var g=Object.prototype.hasOwnProperty;e.forOwn=function(a,b,c){for(var e in a)g.call(a,e)&&b.call(c,a[e],
e)}},{assert:17,util:20}],17:[function(h,k,e){function f(a,b){return p.isUndefined(b)?""+b:p.isNumber(b)&&(isNaN(b)||!isFinite(b))||p.isFunction(b)||p.isRegExp(b)?b.toString():b}function m(a,b){return p.isString(a)?a.length<b?a:a.slice(0,b):a}function b(a,b,c,d,e){throw new n.AssertionError({message:c,actual:a,expected:b,operator:d,stackStartFunction:e});}function c(a,c){a||b(a,!0,c,"==",n.ok)}function g(a,b){if(a===b)return!0;if(p.isBuffer(a)&&p.isBuffer(b)){if(a.length!=b.length)return!1;for(var c=
0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return p.isDate(a)&&p.isDate(b)?a.getTime()===b.getTime():p.isRegExp(a)&&p.isRegExp(b)?a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.lastIndex===b.lastIndex&&a.ignoreCase===b.ignoreCase:p.isObject(a)||p.isObject(b)?q(a,b):a==b}function a(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function q(b,c){if(p.isNullOrUndefined(b)||p.isNullOrUndefined(c)||b.prototype!==c.prototype)return!1;if(a(b)){if(!a(c))return!1;
b=s.call(b);c=s.call(c);return g(b,c)}try{var d=t(b),e=t(c),f}catch(h){return!1}if(d.length!=e.length)return!1;d.sort();e.sort();for(f=d.length-1;0<=f;f--)if(d[f]!=e[f])return!1;for(f=d.length-1;0<=f;f--)if(e=d[f],!g(b[e],c[e]))return!1;return!0}function d(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b||!0===b.call({},a)?!0:!1:!1}function l(a,c,e,g){var f;p.isString(e)&&(g=e,e=null);try{c()}catch(h){f=h}g=(e&&e.name?" ("+e.name+").":".")+(g?" "+g:".");
a&&!f&&b(f,e,"Missing expected exception"+g);!a&&d(f,e)&&b(f,e,"Got unwanted exception"+g);if(a&&f&&e&&!d(f,e)||!a&&f)throw f;}var p=h("util/"),s=Array.prototype.slice,v=Object.prototype.hasOwnProperty,n=k.exports=c;n.AssertionError=function(a){this.name="AssertionError";this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=m(JSON.stringify(this.actual,f),128)+" "+this.operator+" "+m(JSON.stringify(this.expected,
f),128),this.generatedMessage=!0);var c=a.stackStartFunction||b;Error.captureStackTrace?Error.captureStackTrace(this,c):(a=Error(),a.stack&&(a=a.stack,c=a.indexOf("\n"+c.name),0<=c&&(c=a.indexOf("\n",c+1),a=a.substring(c+1)),this.stack=a))};p.inherits(n.AssertionError,Error);n.fail=b;n.ok=c;n.equal=function(a,c,d){a!=c&&b(a,c,d,"==",n.equal)};n.notEqual=function(a,c,d){a==c&&b(a,c,d,"!=",n.notEqual)};n.deepEqual=function(a,c,d){g(a,c)||b(a,c,d,"deepEqual",n.deepEqual)};n.notDeepEqual=function(a,c,
d){g(a,c)&&b(a,c,d,"notDeepEqual",n.notDeepEqual)};n.strictEqual=function(a,c,d){a!==c&&b(a,c,d,"===",n.strictEqual)};n.notStrictEqual=function(a,c,d){a===c&&b(a,c,d,"!==",n.notStrictEqual)};n.throws=function(a,b,c){l.apply(this,[!0].concat(s.call(arguments)))};n.doesNotThrow=function(a,b){l.apply(this,[!1].concat(s.call(arguments)))};n.ifError=function(a){if(a)throw a;};var t=Object.keys||function(a){var b=[],c;for(c in a)v.call(a,c)&&b.push(c);return b}},{"util/":20}],18:[function(h,k,e){k.exports=
"function"===typeof Object.create?function(e,h){e.super_=h;e.prototype=Object.create(h.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,h){e.super_=h;var b=function(){};b.prototype=h.prototype;e.prototype=new b;e.prototype.constructor=e}},{}],19:[function(h,k,e){k.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},{}],20:[function(h,k,e){function f(a,c){var d={seen:[],
stylize:b};3<=arguments.length&&(d.depth=arguments[2]);4<=arguments.length&&(d.colors=arguments[3]);v(c)?d.showHidden=c:c&&e._extend(d,c);r(d.showHidden)&&(d.showHidden=!1);r(d.depth)&&(d.depth=2);r(d.colors)&&(d.colors=!1);r(d.customInspect)&&(d.customInspect=!0);d.colors&&(d.stylize=m);return g(d,a,d.depth)}function m(a,b){var c=f.styles[b];return c?"\u001b["+f.colors[c][0]+"m"+a+"\u001b["+f.colors[c][1]+"m":a}function b(a,b){return a}function c(a){var b={};a.forEach(function(a,c){b[a]=!0});return b}
function g(b,f,h){if(b.customInspect&&f&&y(f.inspect)&&f.inspect!==e.inspect&&(!f.constructor||f.constructor.prototype!==f)){var k=f.inspect(h,b);t(k)||(k=g(b,k,h));return k}if(k=a(b,f))return k;var m=Object.keys(f),n=c(m);b.showHidden&&(m=Object.getOwnPropertyNames(f));if(x(f)&&(0<=m.indexOf("message")||0<=m.indexOf("description")))return q(f);if(0===m.length){if(y(f))return b.stylize("[Function"+(f.name?": "+f.name:"")+"]","special");if(w(f))return b.stylize(RegExp.prototype.toString.call(f),"regexp");
if(D(f))return b.stylize(Date.prototype.toString.call(f),"date");if(x(f))return q(f)}var k="",z=!1,A=["{","}"];s(f)&&(z=!0,A=["[","]"]);y(f)&&(k=" [Function"+(f.name?": "+f.name:"")+"]");w(f)&&(k=" "+RegExp.prototype.toString.call(f));D(f)&&(k=" "+Date.prototype.toUTCString.call(f));x(f)&&(k=" "+q(f));if(0===m.length&&(!z||0==f.length))return A[0]+k+A[1];if(0>h)return w(f)?b.stylize(RegExp.prototype.toString.call(f),"regexp"):b.stylize("[Object]","special");b.seen.push(f);m=z?d(b,f,h,n,m):m.map(function(a){return l(b,
f,h,n,a,z)});b.seen.pop();return p(m,k,A)}function a(a,b){if(r(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}if(n(b))return a.stylize(""+b,"number");if(v(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function q(a){return"["+Error.prototype.toString.call(a)+"]"}function d(a,b,c,d,e){for(var f=[],g=0,h=b.length;g<h;++g)Object.prototype.hasOwnProperty.call(b,
String(g))?f.push(l(a,b,c,d,String(g),!0)):f.push("");e.forEach(function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))});return f}function l(a,b,c,d,e,f){var h,k;b=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]};b.get?k=b.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):b.set&&(k=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(d,e)||(h="["+e+"]");k||(0>a.seen.indexOf(b.value)?(k=null===c?g(a,b.value,null):g(a,b.value,c-1),-1<k.indexOf("\n")&&(k=f?
k.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+k.split("\n").map(function(a){return" "+a}).join("\n"))):k=a.stylize("[Circular]","special"));if(r(h)){if(f&&e.match(/^\d+$/))return k;h=JSON.stringify(""+e);h.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(h=h.substr(1,h.length-2),h=a.stylize(h,"name")):(h=h.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),h=a.stylize(h,"string"))}return h+": "+k}function p(a,b,c){var d=0;return 60<a.reduce(function(a,b){d++;0<=b.indexOf("\n")&&
d++;return a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0)?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function s(a){return Array.isArray(a)}function v(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}function t(a){return"string"===typeof a}function r(a){return void 0===a}function w(a){return u(a)&&"[object RegExp]"===Object.prototype.toString.call(a)}function u(a){return"object"===typeof a&&null!==a}function D(a){return u(a)&&"[object Date]"===
Object.prototype.toString.call(a)}function x(a){return u(a)&&("[object Error]"===Object.prototype.toString.call(a)||a instanceof Error)}function y(a){return"function"===typeof a}function E(a){return 10>a?"0"+a.toString(10):a.toString(10)}function G(){var a=new Date,b=[E(a.getHours()),E(a.getMinutes()),E(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var I=/%[sdj%]/g;e.format=function(a){if(!t(a)){for(var b=[],c=0;c<arguments.length;c++)b.push(f(arguments[c]));return b.join(" ")}for(var c=
1,d=arguments,e=d.length,b=String(a).replace(I,function(a){if("%%"===a)return"%";if(c>=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),g=d[c];c<e;g=d[++c])b=null!==g&&u(g)?b+(" "+f(g)):b+(" "+g);return b};e.deprecate=function(a,b){if(r(global.process))return function(){return e.deprecate(a,b).apply(this,arguments)};if(!0===process.noDeprecation)return a;var c=!1;return function(){if(!c){if(process.throwDeprecation)throw Error(b);
process.traceDeprecation?console.trace(b):console.error(b);c=!0}return a.apply(this,arguments)}};var B={},F;e.debuglog=function(a){r(F)&&(F=process.env.NODE_DEBUG||"");a=a.toUpperCase();if(!B[a])if(RegExp("\\b"+a+"\\b","i").test(F)){var b=process.pid;B[a]=function(){var c=e.format.apply(e,arguments);console.error("%s %d: %s",a,b,c)}}else B[a]=function(){};return B[a]};e.inspect=f;f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,
39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};f.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};e.isArray=s;e.isBoolean=v;e.isNull=function(a){return null===a};e.isNullOrUndefined=function(a){return null==a};e.isNumber=n;e.isString=t;e.isSymbol=function(a){return"symbol"===typeof a};e.isUndefined=r;e.isRegExp=w;e.isObject=u;e.isDate=D;e.isError=x;e.isFunction=y;e.isPrimitive=function(a){return null===
a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};e.isBuffer=h("./support/isBuffer");var H="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");e.log=function(){console.log("%s - %s",G(),e.format.apply(e,arguments))};e.inherits=h("inherits");e._extend=function(a,b){if(!b||!u(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{"./support/isBuffer":19,inherits:18}]},{},[1])(1)});
!function(C){if("object"==typeof exports)module.exports=C();else if("function"==typeof define&&define.amd)define(C);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.Should=C()}}(function(){return function h(k,f,g){function m(c,a){if(!f[c]){if(!k[c]){var b="function"==typeof require&&require;if(!a&&b)return b(c,!0);if(e)return e(c,!0);throw Error("Cannot find module '"+c+"'");}b=f[c]={exports:{}};k[c][0].call(b.exports,function(a){var l=
k[c][1][a];return m(l?l:a)},b,b.exports,h,k,f,g)}return f[c].exports}for(var e="function"==typeof require&&require,b=0;b<g.length;b++)m(g[b]);return m}({1:[function(h,k,f){f=h("./should");f.use(h("./ext/assert")).use(h("./ext/chain")).use(h("./ext/bool")).use(h("./ext/number")).use(h("./ext/eql")).use(h("./ext/type")).use(h("./ext/string")).use(h("./ext/property")).use(h("./ext/error")).use(h("./ext/match")).use(h("./ext/browser/jquery")).use(h("./ext/deprecated"));k.exports=f},{"./ext/assert":3,
"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(h,k,f){function g(c,a){if(c===a)return!0;if(e.isBuffer(c)&&e.isBuffer(a)){if(c.length!=a.length)return!1;for(var b=0;b<c.length;b++)if(c[b]!==a[b])return!1;return!0}return e.isDate(c)&&e.isDate(a)?c.getTime()===a.getTime():e.isRegExp(c)&&e.isRegExp(a)?c.source===a.source&&c.global===
a.global&&c.multiline===a.multiline&&c.lastIndex===a.lastIndex&&c.ignoreCase===a.ignoreCase:e.isObject(c)||e.isObject(a)?m(c,a):c==a}function m(c,a){if(e.isNullOrUndefined(c)||e.isNullOrUndefined(a)||c.prototype!==a.prototype)return!1;if(e.isArguments(c)){if(!e.isArguments(a))return!1;c=b.call(c);a=b.call(a);return g(c,a)}try{var f=Object.keys(c),d=Object.keys(a),l}catch(p){return!1}if(f.length!=d.length)return!1;f.sort();d.sort();for(l=f.length-1;0<=l;l--)if(f[l]!=d[l])return!1;for(l=f.length-1;0<=
l;l--)if(d=f[l],!g(c[d],a[d]))return!1;return!0}var e=h("./util");k.exports=g;var b=Array.prototype.slice},{"./util":16}],3:[function(h,k,f){var g=h("../util"),m=h("assert"),e=m.AssertionError;k.exports=function(b){var c=b.format;g.merge(b,m);b.exist=b.exists=function(a,g){if(null==a)throw new e({message:g||"expected "+c(a)+" to exist",stackStartFunction:b.exist});};b.not={};b.not.exist=b.not.exists=function(a,g){if(null!=a)throw new e({message:g||"expected "+c(a)+" to not exist",stackStartFunction:b.not.exist});
}}},{"../util":16,assert:17}],4:[function(h,k,f){k.exports=function(g,f){f.add("true",function(){this.is.exactly(!0)},!0);f.add("false",function(){this.is.exactly(!1)},!0);f.add("ok",function(){this.params={operator:"to be truthy"};this.assert(this.obj)},!0)}},{}],5:[function(h,k,f){var g=h("../../util");k.exports=function(f,e){function b(l,d,e,b,f){var q=(g.isObject(b)?Object.keys(b):[b]).reduce(function(d,b){var c=a(this.obj)[l](b);"undefined"!==typeof c&&(d[b]=c);return d}.bind(this),{});4===arguments.length&&
g.isObject(b)?(this.params={operator:"to have "+e+" "+c(b)},q.should.have.properties(b)):4===arguments.length?(this.params={operator:"to have "+d+" "+c(b)},q.should.have.property(b)):(this.params={operator:"to have "+d+" "+c(b)+" with value "+c(f)},q.should.have.property(b,f))}var c=f.format,a=this.jQuery||this.$;"undefined"!==typeof HTMLElement&&HTMLElement&&!HTMLElement.prototype.inspect&&(HTMLElement.prototype.inspect=function(){return this.outerHTML});"undefined"!==typeof jQuery&&jQuery&&!jQuery.prototype.inspect&&
(jQuery.fn.inspect=function(){var a=this.toArray().map(function(a){return g.inspect(a)}).join(", ");return this.selector?"SELECTOR("+this.selector+") matching "+this.length+" elements"+(a.length?": "+a:""):a});var q=function(l){return a("<div/>").append(l).html()},d=function(l,d,b){e.add(d||l,function(){this.params={operator:"to be "+(b||l)};this.assert(a(this.obj).is(":"+l))},!0)};e.add("className",function(l){this.params={operator:"to have class "+l};this.assert(a(this.obj).hasClass(l))});e.add("css",
function(l){this.params={operator:"to have css "+c(l)};for(var d in l){var b=l[d];"auto"===b&&"auto"===a(this.obj).get(0).style[d]||a(this.obj).css(d).should.eql(b)}});d("visible");d("hidden");d("selected");d("checked");d("disabled");d("empty","emptyJq");d("focus","focused","focused");e.add("inDOM",function(){this.params={operator:"to be in the DOM"};this.assert(a.contains(document.documentElement,a(this.obj)[0]))},!0);e.add("exist",function(){this.params={operator:"to exist"};a(this.obj).should.not.have.length(0)},
!0);e.add("attr",function(){var a=["attr","attribute","attributes"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("prop",function(){var a=["prop","property","properties"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("elementId",function(a){this.params={operator:"to have ID "+c(a)};this.obj.should.have.attr("id",a)});e.add("html",function(l){this.params={operator:"to have HTML "+c(l)};a(this.obj).html().should.eql(q(l))});e.add("containHtml",function(l){this.params=
{operator:"to contain HTML "+c(l)};a(this.obj).html().indexOf(q(l)).should.be.above(-1)});e.add("text",function(l){this.params={operator:"to have text "+c(l)};var d=a.trim(a(this.obj).text());g.isRegExp(l)?d.should.match(l):d.should.eql(l)});e.add("containText",function(l){this.params={operator:"to contain text "+c(l)};var d=a.trim(a(this.obj).text());g.isRegExp(l)?d.should.match(l):d.indexOf(l).should.be.above(-1)});e.add("value",function(d){this.params={operator:"to have value "+c(d)};a(this.obj).val().should.eql(d)});
e.add("data",function(){var a=["data","data","data"].concat(Array.prototype.slice.call(arguments,0));b.apply(this,a)});e.add("containElement",function(d){this.params={operator:"to contain "+a(d).inspect()};a(this.obj).find(d).should.not.have.length(0)});e.add("matchedBy",function(d){this.params={operator:"to be matched by selector "+d};a(this.obj).filter(d).should.not.have.length(0)});e.add("handle",function(d){this.params={operator:"to handle "+d};var b=a._data(a(this.obj).get(0),"events");if(!b||
!d||"string"!==typeof d)return this.assert(!1);var c=d.split(".");d=c.shift();var e=c.slice(0).sort(),e=RegExp("(^|\\.)"+e.join("\\.(?:.*\\.)?")+"(\\.|$)");if(b[d]&&c.length){for(c=0;c<b[d].length;c++)if(e.test(b[d][c].namespace))return;this.assert(!1)}else b.should.have.property(d),b[d].should.not.have.length(0)});e.add("handleWith",function(d,b){this.params={operator:"to handle "+d+" with "+b};for(var c=d.split(".")[0],c=a._data(a(this.obj).get(0),"events")[c],e=0;e<c.length;e++)if(c[e].handler==
b)return;this.assert(!1)})}},{"../../util":16}],6:[function(h,k,f){k.exports=function(g,f){"an of a and be have with is which the".split(" ").forEach(function(e){Object.defineProperty(f.prototype,e,{get:function(){return this}})})}},{}],7:[function(h,k,f){var g=h("../util"),m=h("../eql");k.exports=function(e,b){var c=e.format;b.add("include",function(a,b){if(Array.isArray(this.obj)||g.isString(this.obj))this.params={operator:"to include "+c(a),message:b},this.assert(~this.obj.indexOf(a));else{this.params=
{operator:"to include an object equal to "+c(a),message:b};var d={},e;for(e in a)d[e]=this.obj[e];this.assert(m(d,a))}});b.add("includeEql",function(a,b){this.params={operator:"to include an object equal to "+c(a),message:b};this.assert(this.obj.some(function(d){return m(a,d)}))})}},{"../eql":2,"../util":16}],8:[function(h,k,f){var g=h("../eql");k.exports=function(f,e){e.add("eql",function(b,c){this.params={operator:"to equal",expected:b,showDiff:!0,message:c};this.assert(g(b,this.obj))});e.add("equal",
function(b,c){this.params={operator:"to be",expected:b,showDiff:!0,message:c};this.assert(b===this.obj)});e.alias("equal","exactly")}},{"../eql":2}],9:[function(h,k,f){k.exports=function(g,f){var e=g.format;f.add("throw",function(b){var c=this.obj,a={},g="",d=!0;try{c(),d=!1}catch(l){a=l}d&&("string"==typeof b?d=b==a.message:b instanceof RegExp?d=b.test(a.message):"function"==typeof b&&(d=a instanceof b),b&&!d?"string"==typeof b?g=" with a message matching '"+b+"', but got '"+a.message+"'":b instanceof
RegExp?g=" with a message matching "+b+", but got '"+a.message+"'":"function"==typeof b&&(g=" of type "+b.name+", but got "+a.constructor.name):g=" (got "+e(a)+")");this.params={operator:"to throw exception"+g};this.assert(d)});f.alias("throw","throwError")}},{}],10:[function(h,k,f){var g=h("../util"),m=h("../eql");k.exports=function(e,b){var c=e.format;b.add("match",function(a,f){this.params={operator:"to match "+c(a),message:f};if(!m(this.obj,a))if(g.isRegExp(a))if(g.isString(this.obj))this.assert(a.exec(this.obj));
else if(Array.isArray(this.obj))this.obj.forEach(function(d){this.assert(a.exec(d))},this);else{if(g.isObject(this.obj)){var d=[],l=[];g.forOwn(this.obj,function(b,e){a.exec(b)?l.push(c(e)):d.push(c(e))},this);d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", "));l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", "));this.assert(0==d.length)}}else if(g.isFunction(a)){var h;try{h=a(this.obj)}catch(k){throw k instanceof e.AssertionError&&(this.params.operator+=
"\n\t"+k.message),k;}h instanceof b&&(this.params.operator+="\n\t"+h.getMessage());g.isBoolean(h)&&this.assert(h)}else g.isObject(a)?(d=[],l=[],g.forOwn(a,function(a,b){try{this.obj[b].should.match(a),l.push(b)}catch(c){if(c instanceof e.AssertionError)d.push(b);else throw c;}},this),d.length&&(this.params.operator+="\n\tnot matched properties: "+d.join(", ")),l.length&&(this.params.operator+="\n\tmatched properties: "+l.join(", ")),this.assert(0==d.length)):this.assert(!1)});b.add("matchEach",function(a,
b){this.params={operator:"to match each "+c(a),message:b};var d=a;g.isRegExp(a)?d=function(d){return!!a.exec(d)}:g.isFunction(a)||(d=function(d){return m(d,a)});g.forOwn(this.obj,function(a,b){var c=d(a,b);g.isBoolean(c)&&this.assert(c)},this)})}},{"../eql":2,"../util":16}],11:[function(h,k,f){k.exports=function(g,f){f.add("NaN",function(){this.params={operator:"to be NaN"};this.assert(this.obj!==this.obj)},!0);f.add("Infinity",function(){this.params={operator:"to be Infinity"};this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},
!0);f.add("within",function(e,b,c){this.params={operator:"to be within "+e+".."+b,message:c};this.assert(this.obj>=e&&this.obj<=b)});f.add("approximately",function(e,b,c){this.params={operator:"to be approximately "+e+" \u00b1"+b,message:c};this.assert(Math.abs(this.obj-e)<=b)});f.add("above",function(e,b){this.params={operator:"to be above "+e,message:b};this.assert(this.obj>e)});f.add("below",function(e,b){this.params={operator:"to be below "+e,message:b};this.assert(this.obj<e)});f.alias("above",
"greaterThan");f.alias("below","lessThan")}},{}],12:[function(h,k,f){var g=h("../util"),m=h("../eql"),e=Array.prototype.slice;k.exports=function(b,c){var a=b.format;c.add("enumerable",function(a,b){this.params={operator:"to have enumerable property '"+a+"'"};this.assert(this.obj.propertyIsEnumerable(a));1<arguments.length&&(this.params.operator+=" equal to '"+b+"'",this.assert(m(b,this.obj[a])))});c.add("property",function(a,b){if(1<arguments.length){var c={};c[a]=b;this.have.properties(c)}else this.have.properties(a);
this.obj=this.obj[a]});c.add("properties",function(d){var b={};1<arguments.length?d=e.call(arguments):Array.isArray(d)||(g.isString(d)?d=[d]:(b=d,d=Object.keys(d)));var c=Object(this.obj),f=[];d.forEach(function(d){d in c||f.push(a(d))});var h=f;0===h.length?h=d.map(a):this.one&&(h=d.filter(function(d){return 0>f.indexOf(a(d))}).map(a));var k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===f.length||this.one&&
f.length!=d.length);var q=Object.keys(b);if(q.length){var r=[],h=[];q.forEach(function(d){var e=b[d];m(c[d],e)?h.push(a(d)+" of "+a(e)):r.push(a(d)+" of "+a(e)+" (got "+a(c[d])+")")});if(0!==r.length&&!this.one||this.one&&0===h.length)h=r;k=(1===h.length?"to have property ":"to have "+(this.one?"any of ":"")+"properties ")+h.join(", ");this.params={operator:k};this.assert(0===r.length||this.one&&r.length!=q.length)}});c.add("length",function(a,b){this.have.property("length",a,b)});c.alias("length",
"lengthOf");var f=Object.prototype.hasOwnProperty;c.add("ownProperty",function(d,b){this.params={operator:"to have own property "+a(d),message:b};this.assert(f.call(this.obj,d));this.obj=this.obj[d]});c.alias("hasOwnProperty","ownProperty");c.add("empty",function(){this.params={operator:"to be empty"};if(g.isString(this.obj)||Array.isArray(this.obj)||g.isArguments(this.obj))this.have.property("length",0);else{var a=Object(this.obj),b;for(b in a)this.have.not.ownProperty(b)}},!0);c.add("keys",function(d){1<
arguments.length?d=e.call(arguments):1===arguments.length&&g.isString(d)?d=[d]:0===arguments.length&&(d=[]);var b=Object(this.obj),c=[];d.forEach(function(d){f.call(this.obj,d)||c.push(a(d))},this);var h=[];Object.keys(b).forEach(function(b){0>d.indexOf(b)&&h.push(a(b))});this.params={operator:(0===d.length?"to be empty":"to have "+(1===d.length?"key ":"keys "))+d.map(a).join(", ")};0<c.length&&(this.params.operator+="\n\tmissing keys: "+c.join(", "));0<h.length&&(this.params.operator+="\n\textra keys: "+
h.join(", "));this.assert(0===c.length&&0===h.length)});c.alias("keys","key");c.add("containEql",function(b){this.params={operator:"to contain "+a(b)};var c=this.obj;Array.isArray(c)?this.assert(c.some(function(a){return m(a,b)})):g.isString(c)?this.assert(0<=c.indexOf(String(b))):g.isObject(c)?g.forOwn(b,function(a,b){c.should.have.property(b,a)}):this.assert(!1)});c.add("containDeep",function(d){this.params={operator:"to contain "+a(d)};var c=this.obj;if(Array.isArray(c))if(Array.isArray(d)){var e=
0;c.forEach(function(a){try{b(a).not.be.null.and.containDeep(d[e]),e++}catch(c){if(!(c instanceof b.AssertionError))throw c;}});this.assert(e==d.length)}else this.assert(!1);else g.isString(c)?this.assert(0<=c.indexOf(String(d))):g.isObject(c)?g.isObject(d)?g.forOwn(d,function(a,d){b(c[d]).not.be.null.and.containDeep(a)}):this.assert(!1):this.eql(d)})}},{"../eql":2,"../util":16}],13:[function(h,k,f){k.exports=function(f,h){h.add("startWith",function(e,b){this.params={operator:"to start with "+f.format(e),
message:b};this.assert(0===this.obj.indexOf(e))});h.add("endWith",function(e,b){this.params={operator:"to end with "+f.format(e),message:b};this.assert(0<=this.obj.indexOf(e,this.obj.length-e.length))})}},{}],14:[function(h,k,f){var g=h("../util");k.exports=function(f,e){e.add("Number",function(){this.params={operator:"to be a number"};this.assert(g.isNumber(this.obj))},!0);e.add("arguments",function(){this.params={operator:"to be arguments"};this.assert(g.isArguments(this.obj))},!0);e.add("type",
function(b,c){this.params={operator:"to have type "+b,message:c};(typeof this.obj).should.be.exactly(b,c)});e.add("instanceof",function(b,c){this.params={operator:"to be an instance of "+b.name,message:c};this.assert(Object(this.obj)instanceof b)});e.add("Function",function(){this.params={operator:"to be a function"};this.assert(g.isFunction(this.obj))},!0);e.add("Object",function(){this.params={operator:"to be an object"};this.assert(g.isObject(this.obj))},!0);e.add("String",function(){this.params=
{operator:"to be a string"};this.assert(g.isString(this.obj))},!0);e.add("Array",function(){this.params={operator:"to be an array"};this.assert(Array.isArray(this.obj))},!0);e.add("Boolean",function(){this.params={operator:"to be a boolean"};this.assert(g.isBoolean(this.obj))},!0);e.add("Error",function(){this.params={operator:"to be an error"};this.assert(g.isError(this.obj))},!0);e.add("null",function(){this.params={operator:"to be null"};this.assert(null===this.obj)},!0);e.alias("instanceof","instanceOf")}},
{"../util":16}],15:[function(h,k,f){var g=h("./util"),m=g.AssertionError,e=g.inspect,b=function(a){return new c(g.isWrapperType(a)?a.valueOf():a)},c=b.Assertion=function(a){this.obj=a};c.add=function(a,d,e){var f={};f[e?"get":"value"]=function(){var a=new c(this.obj);a.copy=a.copyIfMissing;a.one=this.one;try{d.apply(a,arguments)}catch(e){this.copy(a);if(e instanceof b.AssertionError){if(this.negate)return this.obj=a.obj,this.negate=!1,this;this.assert(!1)}throw e;}this.copy(a);this.negate&&this.assert(!1);
this.obj=a.obj;this.negate=!1;return this};Object.defineProperty(c.prototype,a,f)};c.alias=function(a,b){c.prototype[b]=c.prototype[a]};b.AssertionError=m;var a=b.format=function(a){return g.isDate(a)&&"function"!==typeof a.inspect?a.toISOString():e(a,{depth:null})};b.use=function(a){a(this,c);return this};k.exports=b;Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return b(this)},configurable:!0});c.prototype={constructor:c,assert:function(a){if(!a){a=this.params;
var b=a.message,c=!1;b||(b=this.getMessage(),c=!0);b=new m({message:b,actual:this.obj,expected:a.expected,stackStartFunction:this.assert});b.showDiff=a.showDiff;b.operator=a.operator;b.generatedMessage=c;throw b;}},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:a(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+a(this.params.expected):"")},copy:function(a){this.params=a.params},copyIfMissing:function(a){this.params||(this.params=
a.params)},get not(){this.negate=!this.negate;return this},get any(){this.one=!0;return this}}},{"./util":16}],16:[function(h,k,f){function g(a){return"number"===typeof a||a instanceof Number}function m(a){return"string"===typeof a||a instanceof String}function e(a){return"boolean"===typeof a||a instanceof Boolean}function b(a){return"object"===typeof a&&null!==a}f.isWrapperType=function(a){return g(a)||m(a)||e(a)};f.merge=function(a,b){if(a&&b)for(var c in b)a[c]=b[c];return a};f.isNumber=g;f.isBoolean=
e;f.isString=m;f.isBuffer=function(a){return"undefined"!==typeof Buffer&&a instanceof Buffer};f.isDate=function(a){return b(a)&&"[object Date]"===Object.prototype.toString.call(a)};f.isObject=b;f.isRegExp=function(a){return b(a)&&"[object RegExp]"===Object.prototype.toString.call(a)};f.isNullOrUndefined=function(a){return null==a};f.isArguments=function(a){return"[object Arguments]"===Object.prototype.toString.call(a)};f.isFunction=function(a){return"function"===typeof a||a instanceof Function};f.isError=
function(a){return b(a)&&"[object Error]"===Object.prototype.toString.call(a)||a instanceof Error};f.inspect=h("util").inspect;f.AssertionError=h("assert").AssertionError;var c=Object.prototype.hasOwnProperty;f.forOwn=function(a,b,d){for(var e in a)c.call(a,e)&&b.call(d,a[e],e)}},{assert:17,util:20}],17:[function(h,k,f){function g(a,b){return p.isUndefined(b)?""+b:p.isNumber(b)&&(isNaN(b)||!isFinite(b))||p.isFunction(b)||p.isRegExp(b)?b.toString():b}function m(a,b){return p.isString(a)?a.length<b?
a:a.slice(0,b):a}function e(a,b,c,d,e){throw new n.AssertionError({message:c,actual:a,expected:b,operator:d,stackStartFunction:e});}function b(a,b){a||e(a,!0,b,"==",n.ok)}function c(a,b){if(a===b)return!0;if(p.isBuffer(a)&&p.isBuffer(b)){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==b[c])return!1;return!0}return p.isDate(a)&&p.isDate(b)?a.getTime()===b.getTime():p.isRegExp(a)&&p.isRegExp(b)?a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.lastIndex===b.lastIndex&&
a.ignoreCase===b.ignoreCase:p.isObject(a)||p.isObject(b)?q(a,b):a==b}function a(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function q(b,d){if(p.isNullOrUndefined(b)||p.isNullOrUndefined(d)||b.prototype!==d.prototype)return!1;if(a(b)){if(!a(d))return!1;b=s.call(b);d=s.call(d);return c(b,d)}try{var e=t(b),f=t(d),g}catch(h){return!1}if(e.length!=f.length)return!1;e.sort();f.sort();for(g=e.length-1;0<=g;g--)if(e[g]!=f[g])return!1;for(g=e.length-1;0<=g;g--)if(f=e[g],!c(b[f],d[f]))return!1;
return!0}function d(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b||!0===b.call({},a)?!0:!1:!1}function l(a,b,c,f){var g;p.isString(c)&&(f=c,c=null);try{b()}catch(h){g=h}f=(c&&c.name?" ("+c.name+").":".")+(f?" "+f:".");a&&!g&&e(g,c,"Missing expected exception"+f);!a&&d(g,c)&&e(g,c,"Got unwanted exception"+f);if(a&&g&&c&&!d(g,c)||!a&&g)throw g;}var p=h("util/"),s=Array.prototype.slice,v=Object.prototype.hasOwnProperty,n=k.exports=b;n.AssertionError=function(a){this.name=
"AssertionError";this.actual=a.actual;this.expected=a.expected;this.operator=a.operator;a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=m(JSON.stringify(this.actual,g),128)+" "+this.operator+" "+m(JSON.stringify(this.expected,g),128),this.generatedMessage=!0);var b=a.stackStartFunction||e;Error.captureStackTrace?Error.captureStackTrace(this,b):(a=Error(),a.stack&&(a=a.stack,b=a.indexOf("\n"+b.name),0<=b&&(b=a.indexOf("\n",b+1),a=a.substring(b+1)),this.stack=a))};p.inherits(n.AssertionError,
Error);n.fail=e;n.ok=b;n.equal=function(a,b,c){a!=b&&e(a,b,c,"==",n.equal)};n.notEqual=function(a,b,c){a==b&&e(a,b,c,"!=",n.notEqual)};n.deepEqual=function(a,b,d){c(a,b)||e(a,b,d,"deepEqual",n.deepEqual)};n.notDeepEqual=function(a,b,d){c(a,b)&&e(a,b,d,"notDeepEqual",n.notDeepEqual)};n.strictEqual=function(a,b,c){a!==b&&e(a,b,c,"===",n.strictEqual)};n.notStrictEqual=function(a,b,c){a===b&&e(a,b,c,"!==",n.notStrictEqual)};n.throws=function(a,b,c){l.apply(this,[!0].concat(s.call(arguments)))};n.doesNotThrow=
function(a,b){l.apply(this,[!1].concat(s.call(arguments)))};n.ifError=function(a){if(a)throw a;};var t=Object.keys||function(a){var b=[],c;for(c in a)v.call(a,c)&&b.push(c);return b}},{"util/":20}],18:[function(h,k,f){k.exports="function"===typeof Object.create?function(f,h){f.super_=h;f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:function(f,h){f.super_=h;var e=function(){};e.prototype=h.prototype;f.prototype=new e;f.prototype.constructor=
f}},{}],19:[function(h,k,f){k.exports=function(f){return f&&"object"===typeof f&&"function"===typeof f.copy&&"function"===typeof f.fill&&"function"===typeof f.readUInt8}},{}],20:[function(h,k,f){function g(a,b){var d={seen:[],stylize:e};3<=arguments.length&&(d.depth=arguments[2]);4<=arguments.length&&(d.colors=arguments[3]);v(b)?d.showHidden=b:b&&f._extend(d,b);r(d.showHidden)&&(d.showHidden=!1);r(d.depth)&&(d.depth=2);r(d.colors)&&(d.colors=!1);r(d.customInspect)&&(d.customInspect=!0);d.colors&&
(d.stylize=m);return c(d,a,d.depth)}function m(a,b){var c=g.styles[b];return c?"\u001b["+g.colors[c][0]+"m"+a+"\u001b["+g.colors[c][1]+"m":a}function e(a,b){return a}function b(a){var b={};a.forEach(function(a,c){b[a]=!0});return b}function c(e,g,h){if(e.customInspect&&g&&y(g.inspect)&&g.inspect!==f.inspect&&(!g.constructor||g.constructor.prototype!==g)){var k=g.inspect(h,e);t(k)||(k=c(e,k,h));return k}if(k=a(e,g))return k;var m=Object.keys(g),n=b(m);e.showHidden&&(m=Object.getOwnPropertyNames(g));
if(x(g)&&(0<=m.indexOf("message")||0<=m.indexOf("description")))return q(g);if(0===m.length){if(y(g))return e.stylize("[Function"+(g.name?": "+g.name:"")+"]","special");if(w(g))return e.stylize(RegExp.prototype.toString.call(g),"regexp");if(D(g))return e.stylize(Date.prototype.toString.call(g),"date");if(x(g))return q(g)}var k="",z=!1,A=["{","}"];s(g)&&(z=!0,A=["[","]"]);y(g)&&(k=" [Function"+(g.name?": "+g.name:"")+"]");w(g)&&(k=" "+RegExp.prototype.toString.call(g));D(g)&&(k=" "+Date.prototype.toUTCString.call(g));
x(g)&&(k=" "+q(g));if(0===m.length&&(!z||0==g.length))return A[0]+k+A[1];if(0>h)return w(g)?e.stylize(RegExp.prototype.toString.call(g),"regexp"):e.stylize("[Object]","special");e.seen.push(g);m=z?d(e,g,h,n,m):m.map(function(a){return l(e,g,h,n,a,z)});e.seen.pop();return p(m,k,A)}function a(a,b){if(r(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}if(n(b))return a.stylize(""+
b,"number");if(v(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function q(a){return"["+Error.prototype.toString.call(a)+"]"}function d(a,b,c,d,e){for(var f=[],g=0,h=b.length;g<h;++g)Object.prototype.hasOwnProperty.call(b,String(g))?f.push(l(a,b,c,d,String(g),!0)):f.push("");e.forEach(function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))});return f}function l(a,b,d,e,f,g){var h,k;b=Object.getOwnPropertyDescriptor(b,f)||{value:b[f]};b.get?k=b.set?a.stylize("[Getter/Setter]",
"special"):a.stylize("[Getter]","special"):b.set&&(k=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(e,f)||(h="["+f+"]");k||(0>a.seen.indexOf(b.value)?(k=null===d?c(a,b.value,null):c(a,b.value,d-1),-1<k.indexOf("\n")&&(k=g?k.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+k.split("\n").map(function(a){return" "+a}).join("\n"))):k=a.stylize("[Circular]","special"));if(r(h)){if(g&&f.match(/^\d+$/))return k;h=JSON.stringify(""+f);h.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?
(h=h.substr(1,h.length-2),h=a.stylize(h,"name")):(h=h.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),h=a.stylize(h,"string"))}return h+": "+k}function p(a,b,c){var d=0;return 60<a.reduce(function(a,b){d++;0<=b.indexOf("\n")&&d++;return a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0)?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function s(a){return Array.isArray(a)}function v(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}
function t(a){return"string"===typeof a}function r(a){return void 0===a}function w(a){return u(a)&&"[object RegExp]"===Object.prototype.toString.call(a)}function u(a){return"object"===typeof a&&null!==a}function D(a){return u(a)&&"[object Date]"===Object.prototype.toString.call(a)}function x(a){return u(a)&&("[object Error]"===Object.prototype.toString.call(a)||a instanceof Error)}function y(a){return"function"===typeof a}function E(a){return 10>a?"0"+a.toString(10):a.toString(10)}function G(){var a=
new Date,b=[E(a.getHours()),E(a.getMinutes()),E(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var I=/%[sdj%]/g;f.format=function(a){if(!t(a)){for(var b=[],c=0;c<arguments.length;c++)b.push(g(arguments[c]));return b.join(" ")}for(var c=1,d=arguments,e=d.length,b=String(a).replace(I,function(a){if("%%"===a)return"%";if(c>=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),
f=d[c];c<e;f=d[++c])b=null!==f&&u(f)?b+(" "+g(f)):b+(" "+f);return b};f.deprecate=function(a,b){if(r(global.process))return function(){return f.deprecate(a,b).apply(this,arguments)};if(!0===process.noDeprecation)return a;var c=!1;return function(){if(!c){if(process.throwDeprecation)throw Error(b);process.traceDeprecation?console.trace(b):console.error(b);c=!0}return a.apply(this,arguments)}};var B={},F;f.debuglog=function(a){r(F)&&(F=process.env.NODE_DEBUG||"");a=a.toUpperCase();if(!B[a])if(RegExp("\\b"+
a+"\\b","i").test(F)){var b=process.pid;B[a]=function(){var c=f.format.apply(f,arguments);console.error("%s %d: %s",a,b,c)}}else B[a]=function(){};return B[a]};f.inspect=g;g.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};g.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};f.isArray=
s;f.isBoolean=v;f.isNull=function(a){return null===a};f.isNullOrUndefined=function(a){return null==a};f.isNumber=n;f.isString=t;f.isSymbol=function(a){return"symbol"===typeof a};f.isUndefined=r;f.isRegExp=w;f.isObject=u;f.isDate=D;f.isError=x;f.isFunction=y;f.isPrimitive=function(a){return null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a||"symbol"===typeof a||"undefined"===typeof a};f.isBuffer=h("./support/isBuffer");var H="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");
f.log=function(){console.log("%s - %s",G(),f.format.apply(f,arguments))};f.inherits=h("inherits");f._extend=function(a,b){if(!b||!u(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{"./support/isBuffer":19,inherits:18}]},{},[1])(1)});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc