Commit a8f4b4d0 authored by Stas SUȘCOV's avatar Stas SUȘCOV

Remove mocha and chai libs.

parent 814755ed
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
!function(i,g){"function"==typeof define&&"object"==typeof define.amd?define(g):this[i]=g()}("chai",function(){function i(g){var h=i.resolve(g),e=i.modules[h];if(!e)throw Error('failed to require "'+g+'"');e.exports||(e.exports={},e.call(e.exports,e,e.exports,i.relative(h)));return e.exports}i.modules={};i.resolve=function(g){var h=g+".js",e=g+"/index.js";return i.modules[h]&&h||i.modules[e]&&e||g};i.register=function(g,h){i.modules[g]=h};i.relative=function(g){return function(h){if("."!=h[0])return i(h);
var e=g.split("/"),h=h.split("/");e.pop();for(var c=0;c<h.length;c++){var j=h[c];".."==j?e.pop():"."!=j&&e.push(j)}return i(e.join("/"))}};i.register("assertion.js",function(g,h,e){function c(a,b,c){d(this,"ssfi",c||arguments.callee);d(this,"object",a);d(this,"message",b)}var j=e("./browser/error"),f=Object.prototype.toString,b=e("./utils"),d=b.flag;g.exports=c;c.includeStack=!1;c.addProperty=function(a,d){b.addProperty(this.prototype,a,d)};c.addMethod=function(a,d){b.addMethod(this.prototype,a,d)};
c.overwriteProperty=function(a,d){b.overwriteProperty(this.prototype,a,d)};c.overwriteMethod=function(a,d){b.overwriteMethod(this.prototype,a,d)};c.prototype.assert=function(a,f,e,h,r){var f=b.getMessage(this,arguments),m=b.getActual(this,arguments);if(!b.test(this,arguments))throw new j({message:f,actual:m,expected:h,stackStartFunction:c.includeStack?this.assert:d(this,"ssfi")});};Object.defineProperty(c.prototype,"_obj",{get:function(){return d(this,"object")},set:function(a){d(this,"object",a)}});
"to be been is and have with".split(" ").forEach(function(a){Object.defineProperty(c.prototype,a,{get:function(){return this},configurable:!0})});Object.defineProperty(c.prototype,"not",{get:function(){d(this,"negate",!0);return this},configurable:!0});Object.defineProperty(c.prototype,"deep",{get:function(){d(this,"deep",!0);return this},configurable:!0});g=function(){var a=function(a){var b=d(this,"object"),c=a.charAt(0).toUpperCase(),e=c+a.slice(1),c=~["A","E","I","O","U"].indexOf(c)?"an ":"a ";
this.assert("[object "+e+"]"===f.call(b),"expected #{this} to be "+c+a,"expected #{this} not to be "+c+a,"[object "+e+"]",f.call(b));return this};a.__proto__=this;return a};Object.defineProperty(c.prototype,"an",{get:g,configurable:!0});Object.defineProperty(c.prototype,"a",{get:g,configurable:!0});g=function(){d(this,"contains",!0);var a=function(a){this.assert(~d(this,"object").indexOf(a),"expected #{this} to include "+b.inspect(a),"expected #{this} to not include "+b.inspect(a));return this};a.__proto__=
this;return a};Object.defineProperty(c.prototype,"contain",{get:g,configurable:!0});Object.defineProperty(c.prototype,"include",{get:g,configurable:!0});Object.defineProperty(c.prototype,"ok",{get:function(){this.assert(d(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");return this},configurable:!0});Object.defineProperty(c.prototype,"true",{get:function(){this.assert(!0===d(this,"object"),"expected #{this} to be true","expected #{this} to be false",this.negate?!1:!0);
return this},configurable:!0});Object.defineProperty(c.prototype,"false",{get:function(){this.assert(!1===d(this,"object"),"expected #{this} to be false","expected #{this} to be true",this.negate?!0:!1);return this},configurable:!0});Object.defineProperty(c.prototype,"null",{get:function(){this.assert(null===d(this,"object"),"expected #{this} to be null","expected #{this} not to be null",this.negate?!1:!0);return this},configurable:!0});Object.defineProperty(c.prototype,"undefined",{get:function(){this.assert(void 0===
d(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined",this.negate?!1:!0);return this},configurable:!0});Object.defineProperty(c.prototype,"exist",{get:function(){this.assert(null!=d(this,"object"),"expected #{this} to exist","expected #{this} to not exist");return this},configurable:!0});Object.defineProperty(c.prototype,"empty",{get:function(){var a=d(this,"object"),b=a;Array.isArray(a)||"string"===typeof object?b=a.length:"object"===typeof a&&(b=Object.keys(a).length);
this.assert(!b,"expected #{this} to be empty","expected #{this} not to be empty");return this},configurable:!0});Object.defineProperty(c.prototype,"arguments",{get:function(){var a=d(this,"object");this.assert("[object Arguments]"==Object.prototype.toString.call(a),"expected #{this} to be arguments","expected #{this} to not be arguments","[object Arguments]",Object.prototype.toString.call(a));return this},configurable:!0});c.prototype.equal=function(a){var b=d(this,"object");d(this,"deep")?(new c(b)).to.eql(a):
this.assert(a===b,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",a);return this};c.prototype.eql=function(a){this.assert(b.eql(a,d(this,"object")),"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",a);return this};c.prototype.above=function(a){this.assert(d(this,"object")>a,"expected #{this} to be above "+a,"expected #{this} to be below "+a);return this};c.prototype.below=function(a){this.assert(d(this,"object")<a,"expected #{this} to be below "+a,
"expected #{this} to be above "+a);return this};c.prototype.within=function(a,b){var c=d(this,"object"),f=a+".."+b;this.assert(c>=a&&c<=b,"expected #{this} to be within "+f,"expected #{this} to not be within "+f);return this};c.prototype.instanceOf=function(a){var c=b.getName(a);this.assert(d(this,"object")instanceof a,"expected #{this} to be an instance of "+c,"expected #{this} to not be an instance of "+c);return this};c.prototype.property=function(a,c){var f=d(this,"object"),e=d(this,"deep")?b.getPathValue(a,
f):f[a],h=d(this,"deep")?"deep property ":"property ";if(d(this,"negate")&&void 0!==c){if(void 0===e)throw Error(b.inspect(f)+" has no "+h+b.inspect(a));}else this.assert(void 0!==e,"expected #{this} to have a "+h+b.inspect(a),"expected #{this} to not have "+h+b.inspect(a));void 0!==c&&this.assert(c===e,"expected #{this} to have a "+h+b.inspect(a)+" of #{exp}, but got #{act}","expected #{this} to not have a "+h+b.inspect(a)+" of #{act}",c,e);d(this,"object",e);return this};c.prototype.ownProperty=
function(a){this.assert(d(this,"object").hasOwnProperty(a),"expected #{this} to have own property "+b.inspect(a),"expected #{this} to not have own property "+b.inspect(a));return this};c.prototype.length=function(a){var b=d(this,"object");(new c(b)).to.have.property("length");b=b.length;this.assert(b==a,"expected #{this} to have a length of #{exp} but got #{act}","expected #{this} to not have a length of #{act}",a,b);return this};c.prototype.match=function(a){var b=d(this,"object");this.assert(a.exec(b),
"expected #{this} to match "+a,"expected #{this} not to match "+a);return this};c.prototype.string=function(a){var f=d(this,"object");(new c(f)).is.a("string");this.assert(~f.indexOf(a),"expected #{this} to contain "+b.inspect(a),"expected #{this} to not contain "+b.inspect(a));return this};c.prototype.keys=function(a){var c=d(this,"object"),f,e=!0,a=a instanceof Array?a:Array.prototype.slice.call(arguments);if(!a.length)throw Error("keys required");var h=Object.keys(c),m=a.length,e=a.every(function(a){return~h.indexOf(a)});
!d(this,"negate")&&!d(this,"contains")&&(e=e&&a.length==h.length);1<m?(a=a.map(function(a){return b.inspect(a)}),f=a.pop(),f=a.join(", ")+", and "+f):f=b.inspect(a[0]);f=(d(this,"contains")?"contain ":"have ")+((1<m?"keys ":"key ")+f);this.assert(e,"expected #{this} to "+f,"expected #{this} to not "+f,a,Object.keys(c));return this};c.prototype.Throw=function(a,f){var e=d(this,"object");(new c(e)).is.a("function");var h=!1,g=null,m=null;0===arguments.length?a=f=null:a&&(a instanceof RegExp||"string"===
typeof a)?(f=a,a=null):a&&a instanceof Error?(g=a,f=a=null):"function"===typeof a?m=(new a).name:a=null;try{e()}catch(j){if(g)return this.assert(j===g,"expected #{this} to throw "+b.inspect(g)+" but "+b.inspect(j)+" was thrown","expected #{this} to not throw "+b.inspect(g)),this;if(a&&(this.assert(j instanceof a,"expected #{this} to throw "+m+" but a "+j.name+" was thrown","expected #{this} to not throw "+m),!f))return this;if(j.message&&f&&f instanceof RegExp)return this.assert(f.exec(j.message),
"expected #{this} to throw error matching "+f+" but got "+b.inspect(j.message),"expected #{this} to throw error not matching "+f),this;if(j.message&&f&&"string"===typeof f)return this.assert(~j.message.indexOf(f),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",f,j.message),this;h=!0}e=m?m:g?b.inspect(g):"an error";this.assert(!0===h,"expected #{this} to throw "+e,"expected #{this} to not throw "+e);return this};c.prototype.respondTo=
function(a){var c=d(this,"object"),c="function"===typeof c?c.prototype[a]:c[a];this.assert("function"===typeof c,"expected #{this} to respond to "+b.inspect(a),"expected #{this} to not respond to "+b.inspect(a),"function",typeof c);return this};c.prototype.satisfy=function(a){var c=d(this,"object");this.assert(a(c),"expected #{this} to satisfy "+b.inspect(a),"expected #{this} to not satisfy"+b.inspect(a),this.negate?!1:!0,a(c));return this};c.prototype.closeTo=function(a,b){var c=d(this,"object");
this.assert(c-b===a||c+b===a,"expected #{this} to be close to "+a+" +/- "+b,"expected #{this} not to be close to "+a+" +/- "+b);return this};(function n(b,d){c.prototype[d]=c.prototype[b];return n})("equal","eq")("above","gt")("below","lt")("length","lengthOf")("keys","key")("ownProperty","haveOwnProperty")("above","greaterThan")("below","lessThan")("Throw","throws")("Throw","throw")("instanceOf","instanceof")});i.register("browser/error.js",function(g){function h(e){e=e||{};this.message=e.message;
this.actual=e.actual;this.expected=e.expected;this.operator=e.operator;e.stackStartFunction&&Error.captureStackTrace&&Error.captureStackTrace(this,e.stackStartFunction)}g.exports=h;h.prototype=Object.create(Error.prototype);h.prototype.name="AssertionError";h.prototype.constructor=h;h.prototype.toString=function(){return this.message}});i.register("chai.js",function(g,h,e){var c=[],h=g.exports={};h.version="1.0.1";h.Assertion=e("./assertion");h.AssertionError=e("./browser/error");var j=e("./utils");
h.use=function(f){~c.indexOf(f)||(f(this,j),c.push(f));return this};g=e("./interface/expect");h.use(g);g=e("./interface/should");h.use(g);e=e("./interface/assert");h.use(e)});i.register("interface/assert.js",function(g){g.exports=function(h,e){var c=h.Assertion,g=e.flag,f=h.assert=function(b,d){(new c(null)).assert(b,d,"[ negation message unavailable ]")};f.fail=function(b,d,a,c){throw new h.AssertionError({actual:b,expected:d,message:a,operator:c,stackStartFunction:f.fail});};f.ok=function(b,d){(new c(b,
d)).is.ok};f.equal=function(b,d,a){a=new c(b,a);a.assert(d==g(a,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",d,b)};f.notEqual=function(b,d,a){a=new c(b,a);a.assert(d!=g(a,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",d,b)};f.strictEqual=function(b,d,a){(new c(b,a)).to.equal(d)};f.notStrictEqual=function(b,d,a){(new c(b,a)).to.not.equal(d)};f.deepEqual=function(b,d,a){(new c(b,a)).to.eql(d)};f.notDeepEqual=function(b,d,a){(new c(b,
a)).to.not.eql(d)};f.isTrue=function(b,d){(new c(b,d)).is["true"]};f.isFalse=function(b,d){(new c(b,d)).is["false"]};f.isNull=function(b,d){(new c(b,d)).to.equal(null)};f.isNotNull=function(b,d){(new c(b,d)).to.not.equal(null)};f.isUndefined=function(b,d){(new c(b,d)).to.equal(void 0)};f.isDefined=function(b,d){(new c(b,d)).to.not.equal(void 0)};f.isFunction=function(b,d){(new c(b,d)).to.be.a("function")};f.isNotFunction=function(b,d){(new c(b,d)).to.not.be.a("function")};f.isObject=function(b,d){(new c(b,
d)).to.be.a("object")};f.isNotObject=function(b,d){(new c(b,d)).to.not.be.a("object")};f.isArray=function(b,d){(new c(b,d)).to.be.an("array")};f.isNotArray=function(b,d){(new c(b,d)).to.not.be.an("array")};f.isString=function(b,d){(new c(b,d)).to.be.a("string")};f.isNotString=function(b,d){(new c(b,d)).to.not.be.a("string")};f.isNumber=function(b,d){(new c(b,d)).to.be.a("number")};f.isNotNumber=function(b,d){(new c(b,d)).to.not.be.a("number")};f.isBoolean=function(b,d){(new c(b,d)).to.be.a("boolean")};
f.isNotBoolean=function(b,d){(new c(b,d)).to.not.be.a("boolean")};f.typeOf=function(b,d,a){(new c(b,a)).to.be.a(d)};f.notTypeOf=function(b,d,a){(new c(b,a)).to.not.be.a(d)};f.instanceOf=function(b,d,a){(new c(b,a)).to.be.instanceOf(d)};f.notInstanceOf=function(b,d,a){(new c(b,a)).to.not.be.instanceOf(d)};f.include=function(b,d,a){a=new c(b,a);Array.isArray(b)?a.to.include(d):"string"===typeof b&&a.to.contain.string(d)};f.match=function(b,d,a){(new c(b,a)).to.match(d)};f.notMatch=function(b,d,a){(new c(b,
a)).to.not.match(d)};f.property=function(b,d,a){(new c(b,a)).to.have.property(d)};f.notProperty=function(b,d,a){(new c(b,a)).to.not.have.property(d)};f.deepProperty=function(b,d,a){(new c(b,a)).to.have.deep.property(d)};f.notDeepProperty=function(b,d,a){(new c(b,a)).to.not.have.deep.property(d)};f.propertyVal=function(b,d,a,f){(new c(b,f)).to.have.property(d,a)};f.propertyNotVal=function(b,d,a,f){(new c(b,f)).to.not.have.property(d,a)};f.deepPropertyVal=function(b,d,a,f){(new c(b,f)).to.have.deep.property(d,
a)};f.deepPropertyNotVal=function(b,d,a,f){(new c(b,f)).to.not.have.deep.property(d,a)};f.lengthOf=function(b,d,a){(new c(b,a)).to.have.length(d)};f.Throw=function(b,d,a){"string"===typeof d&&(a=d,d=null);(new c(b,a)).to.Throw(d)};f.doesNotThrow=function(b,d,a){"string"===typeof d&&(a=d,d=null);(new c(b,a)).to.not.Throw(d)};f.operator=function(b,d,a,f){if(!~"== === > >= < <= != !==".split(" ").indexOf(d))throw Error('Invalid operator "'+d+'"');f=new c(eval(b+d+a),f);f.assert(!0===g(f,"object"),"expected "+
e.inspect(b)+" to be "+d+" "+e.inspect(a),"expected "+e.inspect(b)+" to not be "+d+" "+e.inspect(a))};f.ifError=function(b,d){(new c(b,d)).to.not.be.ok};(function d(a,c){f[c]=f[a];return d})("Throw","throw")("Throw","throws")}});i.register("interface/expect.js",function(g){g.exports=function(h){h.expect=function(e,c){return new h.Assertion(e,c)}}});i.register("interface/should.js",function(g){g.exports=function(h){function e(){Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return this instanceof
String||this instanceof Number?new c(this.constructor(this)):this instanceof Boolean?new c(!0==this):new c(this)},configurable:!0});var e={equal:function(f,b){(new c(f)).to.equal(b)},Throw:function(f,b,d){(new c(f)).to.Throw(b,d)},exist:function(f){(new c(f)).to.exist},not:{}};e.not.equal=function(f,b){(new c(f)).to.not.equal(b)};e.not.Throw=function(f,b,d){(new c(f)).to.not.Throw(b,d)};e.not.exist=function(f){(new c(f)).to.not.exist};e["throw"]=e.Throw;e.not["throw"]=e.not.Throw;return e}var c=h.Assertion;
h.should=e;h.Should=e}});i.register("utils/addMethod.js",function(g){g.exports=function(h,e,c){h[e]=function(){var e=c.apply(this,arguments);return void 0===e?this:e}}});i.register("utils/addProperty.js",function(g){g.exports=function(h,e,c){Object.defineProperty(h,e,{get:function(){var e=c.call(this);return void 0===e?this:e},configurable:!0})}});i.register("utils/eql.js",function(g){function h(f,b){if(f===b)return!0;if(j.isBuffer(f)&&j.isBuffer(b)){if(f.length!=b.length)return!1;for(var d=0;d<f.length;d++)if(f[d]!==
b[d])return!1;return!0}return f instanceof Date&&b instanceof Date?f.getTime()===b.getTime():"object"!=typeof f&&"object"!=typeof b?f===b:c(f,b)}function e(c){return"[object Arguments]"==Object.prototype.toString.call(c)}function c(c,b){if(null===c||void 0===c||(null===b||void 0===b)||c.prototype!==b.prototype)return!1;if(e(c)){if(!e(b))return!1;c=pSlice.call(c);b=pSlice.call(b);return h(c,b)}try{var d=Object.keys(c),a=Object.keys(b),g}catch(j){return!1}if(d.length!=a.length)return!1;d.sort();a.sort();
for(g=d.length-1;0<=g;g--)if(d[g]!=a[g])return!1;for(g=d.length-1;0<=g;g--)if(a=d[g],!h(c[a],b[a]))return!1;return!0}g.exports=h;if(!j)var j={isBuffer:function(){return!1}}});i.register("utils/flag.js",function(g){g.exports=function(h,e,c){var g=h.__flags||(h.__flags=Object.create(null));if(3===arguments.length)g[e]=c;else return g[e]}});i.register("utils/getActual.js",function(g){g.exports=function(h,e){var c=e[4];return"undefined"!==c?c:h.obj}});i.register("utils/getMessage.js",function(g,h,e){var c=
e("./flag"),j=e("./getActual"),f=e("./inspect");g.exports=function(b,d){var a=c(b,"negate"),e=c(b,"object"),h=d[3],g=j(b,d),a=a?d[2]:d[1],r=c(b,"message"),a=(a||"").replace(/#{this}/g,f(e)).replace(/#{act}/g,f(g)).replace(/#{exp}/g,f(h));return r?r+": "+a:a}});i.register("utils/getName.js",function(g){g.exports=function(h){return h.name?h.name:(h=/^\s?function ([^(]*)\(/.exec(h))&&h[1]?h[1]:""}});i.register("utils/getPathValue.js",function(g){function h(e){return e.split(".").filter(Boolean).map(function(c){var e=
/([A-Za-z0-9]+)\[(\d+)\]$/.exec(c),f;e&&(f={p:e[1],i:parseFloat(e[2])});return f||c})}g.exports=function(e,c){for(var g=h(e),f=c,b,d=0,a=g.length;d<a;d++){var i=g[d];f?(f="object"===typeof i&&f[i.p]?f[i.p][i.i]:f[i],d==a-1&&(b=f)):b=void 0}return b}});i.register("utils/index.js",function(g,h,e){h=g.exports={};h.test=e("./test");h.getMessage=e("./getMessage");h.getActual=e("./getActual");h.inspect=e("./inspect");h.flag=e("./flag");h.eql=e("./eql");h.getPathValue=e("./getPathValue");h.getName=e("./getName");
h.addProperty=e("./addProperty");h.addMethod=e("./addMethod");h.overwriteProperty=e("./overwriteProperty");h.overwriteMethod=e("./overwriteMethod")});i.register("utils/inspect.js",function(g,h,e){function c(c,e,g){if(e&&"function"===typeof e.inspect&&e.inspect!==h.inspect&&!(e.constructor&&e.constructor.prototype===e))return e.inspect(g);var k=i(c,e);if(k)return k;var s=Object.keys(e),l=c.showHidden?Object.getOwnPropertyNames(e):s;if(0===l.length||q(e)&&(1===l.length&&"stack"===l[0]||2===l.length&&
"description"===l[0]&&"stack"===l[1])){if("function"===typeof e)return k=t(e),c.stylize("[Function"+(k?": "+k:"")+"]","special");if(a(e))return c.stylize(RegExp.prototype.toString.call(e),"regexp");if(n(e))return c.stylize(Date.prototype.toUTCString.call(e),"date");if(q(e))return"["+Error.prototype.toString.call(e)+"]"}var k="",o=!1,p=["{","}"];if(Array.isArray(e)||"object"===typeof e&&"[object Array]"===Object.prototype.toString.call(e))o=!0,p=["[","]"];"function"===typeof e&&(k=" [Function"+(e.name?
": "+e.name:"")+"]");a(e)&&(k=" "+RegExp.prototype.toString.call(e));n(e)&&(k=" "+Date.prototype.toUTCString.call(e));q(e)&&(k=" "+("["+Error.prototype.toString.call(e)+"]"));if(0===l.length&&(!o||0==e.length))return p[0]+k+p[1];if(0>g)return a(e)?c.stylize(RegExp.prototype.toString.call(e),"regexp"):c.stylize("[Object]","special");c.seen.push(e);l=o?f(c,e,g,s,l):l.map(function(a){return b(c,e,g,s,a,o)});c.seen.pop();return d(l,k,p)}function i(a,b){switch(typeof b){case "undefined":return a.stylize("undefined",
"undefined");case "string":var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string");case "number":return a.stylize(""+b,"number");case "boolean":return a.stylize(""+b,"boolean")}if(null===b)return a.stylize("null","null")}function f(a,c,d,e,f){for(var h=[],g=0,i=c.length;g<i;++g)Object.prototype.hasOwnProperty.call(c,""+g)?h.push(b(a,c,d,e,""+g,!0)):h.push("");f.forEach(function(f){f.match(/^\d+$/)||h.push(b(a,c,d,e,f,!0))});return h}
function b(a,b,d,e,f,h){var g,i;b.__lookupGetter__&&(b.__lookupGetter__(f)?i=b.__lookupSetter__(f)?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):b.__lookupSetter__(f)&&(i=a.stylize("[Setter]","special")));0>e.indexOf(f)&&(g="["+f+"]");i||(0>a.seen.indexOf(b[f])?(i=null===d?c(a,b[f],null):c(a,b[f],d-1),-1<i.indexOf("\n")&&(i=h?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]",
"special"));if("undefined"===typeof g){if(h&&f.match(/^\d+$/))return i;g=JSON.stringify(""+f);g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function d(a,b,c){var d=0;return 60<a.reduce(function(a,b){d++;0<=b.indexOf("\n")&&d++;return a+b.length+1},0)?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function a(a){return"object"===
typeof a&&"[object RegExp]"===Object.prototype.toString.call(a)}function n(a){return"object"===typeof a&&"[object Date]"===Object.prototype.toString.call(a)}function q(a){return"object"===typeof a&&"[object Error]"===Object.prototype.toString.call(a)}var t=e("./getName");g.exports=function(a,b,d){return c({showHidden:b,seen:[],stylize:function(a){return a}},a,"undefined"===typeof d?2:d)}});i.register("utils/overwriteMethod.js",function(g){g.exports=function(g,e,c){var i=g[e],f=function(){return this};
i&&"function"===typeof i&&(f=i);g[e]=function(){var b=c(f).apply(this,arguments);return void 0===b?this:b}}});i.register("utils/overwriteProperty.js",function(g){g.exports=function(g,e,c){var i=Object.getOwnPropertyDescriptor(g,e),f=function(){};i&&"function"===typeof i.get&&(f=i.get);Object.defineProperty(g,e,{get:function(){var b=c(f).call(this);return b===void 0?this:b},configurable:!0})}});i.register("utils/test.js",function(g,h,e){var c=e("./flag");g.exports=function(e,f){var b=c(e,"negate"),
d=f[0];return b?!d:d}});return i("chai")});
\ No newline at end of file
(function(){function j(i){var e=j.resolve(i),a=j.modules[e];if(!a)throw Error('failed to require "'+i+'"');a.exports||(a.exports={},a.call(a.exports,a,a.exports,j.relative(e)));return a.exports}j.modules={};j.resolve=function(i){var e=i+".js",a=i+"/index.js";return j.modules[e]&&e||j.modules[a]&&a||i};j.register=function(i,e){j.modules[i]=e};j.relative=function(i){return function(e){if("."!=e.charAt(0))return j(e);var a=i.split("/"),e=e.split("/");a.pop();for(var b=0;b<e.length;b++){var h=e[b];".."==
h?a.pop():"."!=h&&a.push(h)}return j(a.join("/"))}};j.register("browser/debug.js",function(i){i.exports=function(){return function(){}}});j.register("browser/diff.js",function(){});j.register("browser/events.js",function(i,e){function a(a){return"[object Array]"=={}.toString.call(a)}function b(){}e.EventEmitter=b;b.prototype.on=function(b,g){this.$events||(this.$events={});this.$events[b]?a(this.$events[b])?this.$events[b].push(g):this.$events[b]=[this.$events[b],g]:this.$events[b]=g;return this};
b.prototype.addListener=b.prototype.on;b.prototype.once=function(a,b){function d(){f.removeListener(a,d);b.apply(this,arguments)}var f=this;d.listener=b;this.on(a,d);return this};b.prototype.removeListener=function(b,g){if(this.$events&&this.$events[b]){var d=this.$events[b];if(a(d)){for(var f=-1,c=0,k=d.length;c<k;c++)if(d[c]===g||d[c].listener&&d[c].listener===g){f=c;break}if(0>f)return this;d.splice(f,1);d.length||delete this.$events[b]}else(d===g||d.listener&&d.listener===g)&&delete this.$events[b]}return this};
b.prototype.removeAllListeners=function(b){if(void 0===b)return this.$events={},this;this.$events&&this.$events[b]&&(this.$events[b]=null);return this};b.prototype.listeners=function(b){this.$events||(this.$events={});this.$events[b]||(this.$events[b]=[]);a(this.$events[b])||(this.$events[b]=[this.$events[b]]);return this.$events[b]};b.prototype.emit=function(b){if(!this.$events)return!1;var g=this.$events[b];if(!g)return!1;var d=[].slice.call(arguments,1);if("function"==typeof g)g.apply(this,d);
else if(a(g))for(var g=g.slice(),f=0,c=g.length;f<c;f++)g[f].apply(this,d);else return!1;return!0}});j.register("browser/fs.js",function(){});j.register("browser/path.js",function(){});j.register("browser/progress.js",function(i){function e(){this.percent=0;this.size(0);this.fontSize(11);this.font("helvetica, arial, sans-serif")}i.exports=e;e.prototype.size=function(a){this._size=a;return this};e.prototype.text=function(a){this._text=a;return this};e.prototype.fontSize=function(a){this._fontSize=
a;return this};e.prototype.font=function(a){this._font=a;return this};e.prototype.update=function(a){this.percent=a;return this};e.prototype.draw=function(a){var b=Math.min(this.percent,100),e=this._size,g=e/2,d=g-1,f=this._fontSize;a.font=f+"px "+this._font;var c=2*Math.PI*(b/100);a.clearRect(0,0,e,e);a.strokeStyle="#9f9f9f";a.beginPath();a.arc(g,g,d,0,c,!1);a.stroke();a.strokeStyle="#eee";a.beginPath();a.arc(g,g,d-1,0,c,!0);a.stroke();b=this._text||(b|0)+"%";e=a.measureText(b).width;a.fillText(b,
g-e/2+1,g+f/2-1);return this}});j.register("browser/tty.js",function(i,e){e.isatty=function(){return!0};e.getWindowSize=function(){return[window.innerHeight,window.innerWidth]}});j.register("context.js",function(i){function e(){}i.exports=e;e.prototype.test=function(a){this._test=a;return this};e.prototype.timeout=function(a){this._test.timeout(a);return this};e.prototype.inspect=function(){return JSON.stringify(this,function(a,b){return"_test"==a?void 0:b},2)}});j.register("hook.js",function(i,e,
a){function b(b,d){h.call(this,b,d);this.type="hook"}var h=a("./runnable");i.exports=b;b.prototype=new h;b.prototype.constructor=b});j.register("interfaces/bdd.js",function(i,e,a){var b=a("../suite"),h=a("../test");i.exports=function(a){var d=[a];a.on("pre-require",function(f){f.xdescribe=function(){};f.xit=function(){};f.before=function(c){d[0].beforeAll(c)};f.after=function(c){d[0].afterAll(c)};f.beforeEach=function(c){d[0].beforeEach(c)};f.afterEach=function(c){d[0].afterEach(c)};f.describe=function(c,
f){var a=b.create(d[0],c);d.unshift(a);f();d.shift()};f.it=function(c,f){d[0].addTest(new h(c,f))}})}});j.register("interfaces/exports.js",function(i,e,a){var b=a("../suite"),h=a("../test");i.exports=function(a){function d(c){var a,g;for(g in c)if("function"==typeof c[g])switch(a=c[g],g){case "before":f[0].beforeAll(a);break;case "after":f[0].afterAll(a);break;case "beforeEach":f[0].beforeEach(a);break;case "afterEach":f[0].afterEach(a);break;default:f[0].addTest(new h(g,a))}else a=b.create(f[0],
g),f.unshift(a),d(c[g]),f.shift()}var f=[a];a.on("require",d)}});j.register("interfaces/index.js",function(i,e,a){e.bdd=a("./bdd");e.tdd=a("./tdd");e.qunit=a("./qunit");e.exports=a("./exports")});j.register("interfaces/qunit.js",function(i,e,a){var b=a("../suite"),h=a("../test");i.exports=function(a){var d=[a];a.on("pre-require",function(f){f.before=function(c){d[0].beforeAll(c)};f.after=function(c){d[0].afterAll(c)};f.beforeEach=function(c){d[0].beforeEach(c)};f.afterEach=function(c){d[0].afterEach(c)};
f.suite=function(c){1<d.length&&d.shift();c=b.create(d[0],c);d.unshift(c)};f.test=function(c,f){d[0].addTest(new h(c,f))}})}});j.register("interfaces/tdd.js",function(i,e,a){var b=a("../suite"),h=a("../test");i.exports=function(a){var d=[a];a.on("pre-require",function(f){f.setup=function(c){d[0].beforeEach(c)};f.teardown=function(c){d[0].afterEach(c)};f.suiteSetup=function(c){d[0].beforeAll(c)};f.suiteTeardown=function(c){d[0].afterAll(c)};f.suite=function(c,f){var a=b.create(d[0],c);d.unshift(a);
f();d.shift()};f.test=function(c,f){d[0].addTest(new h(c,f))}})}});j.register("mocha.js",function(i,e,a){e.version="0.14.0";e.utils=a("./utils");e.interfaces=a("./interfaces");e.reporters=a("./reporters");e.Runnable=a("./runnable");e.Context=a("./context");e.Runner=a("./runner");e.Suite=a("./suite");e.Hook=a("./hook");e.Test=a("./test")});j.register("reporters/base.js",function(i,e,a){function b(c){var d=this.stats={suites:0,tests:0,passes:0,failures:0},f=this.failures=[];c&&(this.runner=c,c.on("start",
function(){d.start=new Date}),c.on("suite",function(c){d.suites=d.suites||0;c.root||d.suites++}),c.on("test end",function(){d.tests=d.tests||0;d.tests++}),c.on("pass",function(c){d.passes=d.passes||0;var f=e.slow/2;c.speed=c.duration>e.slow?"slow":c.duration>f?"medium":"fast";d.passes++}),c.on("fail",function(c,a){d.failures=d.failures||0;d.failures++;c.err=a;f.push(c)}),c.on("end",function(){d.end=new Date;d.duration=new Date-d.start}))}function h(c,d){return f["diff"+d](c.actual,c.expected).map(function(c){return c.added?
g("diff added",c.value):c.removed?g("diff removed",c.value):c.value}).join("")}function g(d,f){return f.split("\n").map(function(f){return c(d,f)}).join("\n")}var d=a("browser/tty"),f=a("browser/diff"),a=d.isatty(1)&&d.isatty(2),e=i.exports=b;e.useColors=a;e.colors={pass:90,fail:31,"bright pass":92,"bright fail":91,"bright yellow":93,pending:36,suite:0,"error title":0,"error message":31,"error stack":90,checkmark:32,fast:90,medium:33,slow:31,green:32,light:90,"diff gutter":90,"diff added":42,"diff removed":41};
var c=e.color=function(c,d){return!e.useColors?d:"\u001b["+e.colors[c]+"m"+d+"\u001b[0m"};e.window={width:a?process.stdout.getWindowSize?process.stdout.getWindowSize(1)[0]:d.getWindowSize()[1]:75};e.cursor={hide:function(){process.stdout.write("\u001b[?25l")},show:function(){process.stdout.write("\u001b[?25h")},deleteLine:function(){process.stdout.write("\u001b[2K")},beginningOfLine:function(){process.stdout.write("\u001b[0G")},CR:function(){e.cursor.deleteLine();e.cursor.beginningOfLine()}};e.slow=
75;e.list=function(d){console.error();d.forEach(function(d,f){var a=c("error title"," %s) %s:\n")+c("error message"," %s")+c("error stack","\n%s\n"),b=d.err,g=b.message||"",e=b.stack||g,g=e.indexOf(g)+g.length,k=e.slice(0,g),i=b.actual,j=b.expected;if("string"==typeof i&&"string"==typeof j){k=20>Math.max(i.length,j.length)?h(b,"Chars"):h(b,"Words");a=k.split("\n");if(4<a.length)var r=(""+a.length).length,k=a.map(function(c,d){var f=++d,f=""+f;return Array(r-f.length+1).join(" ")+f+" | "+c}).join("\n");
k="\n"+c("diff removed","actual")+" "+c("diff added","expected")+"\n\n"+k+"\n";k=k.replace(/^/gm," ");a=c("error title"," %s) %s:\n%s")+c("error stack","\n%s\n")}e=e.slice(g+1).replace(/^/gm," ");console.error(a,f+1,d.fullTitle(),k,e)})};b.prototype.epilogue=function(){var d=this.stats,f;console.log();d.failures?(f=c("bright fail"," \u2716")+c("fail"," %d of %d tests failed")+c("light",":"),console.error(f,d.failures,this.runner.total),b.list(this.failures),console.error()):(f=c("bright pass",
" \u2714")+c("green"," %d tests complete")+c("light"," (%dms)"),console.log(f,d.tests||0,d.duration),console.log())}});j.register("reporters/doc.js",function(i,e,a){function b(d){var d=d.replace(/^function *\(.*\) *{/,"").replace(/\s+\}$/,""),f=d.match(/^\n?( *)/)[1].length;return d=d.replace(RegExp("^ {"+f+"}","gm"),"")}var h=a("./base"),g=a("../utils");i.exports=function(d){function f(){return Array(c).join(" ")}h.call(this,d);var c=2;d.on("suite",function(d){d.root||(++c,console.log('%s<section class="suite">',
f()),++c,console.log("%s<h1>%s</h1>",f(),d.title),console.log("%s<dl>",f()))});d.on("suite end",function(d){d.root||(console.log("%s</dl>",f()),--c,console.log("%s</section>",f()),--c)});d.on("pass",function(c){console.log("%s <dt>%s</dt>",f(),c.title);c=g.escape(b(c.fn.toString()));console.log("%s <dd><pre><code>%s</code></pre></dd>",f(),c)})}});j.register("reporters/dot.js",function(i,e,a){function b(d){h.call(this,d);var f=this,c=0.75*h.window.width|0,a=0;d.on("start",function(){process.stdout.write("\n ")});
d.on("pending",function(){process.stdout.write(g("pending","."))});d.on("pass",function(d){0==++a%c&&process.stdout.write("\n ");"slow"==d.speed?process.stdout.write(g("bright yellow",".")):process.stdout.write(g(d.speed,"."))});d.on("fail",function(){0==++a%c&&process.stdout.write("\n ");process.stdout.write(g("fail","."))});d.on("end",function(){console.log();f.epilogue()})}var h=a("./base"),g=h.color;i.exports=b;b.prototype=new h;b.prototype.constructor=b});j.register("reporters/html-cov.js",
function(i,e,a){function b(d){return 75<=d?"high":50<=d?"medium":25<=d?"low":"terrible"}var h=a("./json-cov"),g=a("browser/fs");i.exports=function(d){var f=a("jade"),c=__dirname+"/templates/coverage.jade",e=g.readFileSync(c,"utf8"),l=f.compile(e,{filename:c}),u=this;h.call(this,d,!1);d.on("end",function(){process.stdout.write(l({cov:u.cov,coverageClass:b}))})}});j.register("reporters/html.js",function(i,e,a){function b(c){var d=arguments,f=document.createElement("div"),a=1;f.innerHTML=c.replace(/%([se])/g,
function(c,f){switch(f){case "s":return""+d[a++];case "e":return k(d[a++])}});return f.firstChild}function h(c,d){c.textContent?c.textContent=d:c.innerText=d}function g(c,d,f){c.addEventListener?c.addEventListener(d,f,!1):c.attachEvent("on"+d,f)}function d(c){var c=c.replace(/^function *\(.*\) *{/,"").replace(/\s+\}$/,""),d=c.match(/^\n?( *)/)[1].length;return c=c.replace(RegExp("^ {"+d+"}","gm"),"").replace(/^\s+/,"")}var f=a("./base"),e=a("../utils"),c=a("../browser/progress"),k=e.escape;i.exports=
function(a){f.call(this,a);var e=this.stats,k=a.total,i=document.getElementById("mocha"),j=b(l),n=j.getElementsByTagName("li"),v=n[1].getElementsByTagName("em")[0],w=n[2].getElementsByTagName("em")[0],r=n[3].getElementsByTagName("em")[0],n=j.getElementsByTagName("canvas")[0],p=[i],q,t;n.getContext&&(t=n.getContext("2d"),q=new c);i?(i.appendChild(j),q&&q.size(40),a.on("suite",function(c){if(!c.root){c=b('<div class="suite"><h1>%s</h1></div>',c.title);p[0].appendChild(c);p.unshift(document.createElement("div"));
c.appendChild(p[0])}}),a.on("suite end",function(c){c.root||p.shift()}),a.on("fail",function(c,d){d.uncaught&&a.emit("test end",c)}),a.on("test end",function(c){var f=e.tests/k*100|0;q&&q.update(f).draw(t);f=new Date-e.start;h(v,e.passes);h(w,e.failures);h(r,(f/1E3).toFixed(2));if("passed"==c.state)f=b('<div class="test pass"><h2>%e</h2></div>',c.title);else if(c.pending)f=b('<div class="test pass pending"><h2>%e</h2></div>',c.title);else{var f=b('<div class="test fail"><h2>%e</h2></div>',c.title),
a=c.err.stack||c.err;if("[object Error]"==a)a=c.err.message;f.appendChild(b('<pre class="error">%e</pre>',a))}a=f.getElementsByTagName("h2")[0];g(a,"click",function(){l.style.display="none"==l.style.display?"block":"none"});if(!c.pending){var l=b("<pre><code>%e</code></pre>",d(c.fn.toString()));f.appendChild(l);l.style.display="none"}p[0].appendChild(f)})):document.body.appendChild(b('<div id="error">%s</div>',"#mocha div missing, add it to your document"))};var l='<ul id="stats"><li class="progress"><canvas width="40" height="40"></canvas></li><li class="passes">passes: <em>0</em></li><li class="failures">failures: <em>0</em></li><li class="duration">duration: <em>0</em>s</li></ul>'});
j.register("reporters/index.js",function(i,e,a){e.Base=a("./base");e.Dot=a("./dot");e.Doc=a("./doc");e.TAP=a("./tap");e.JSON=a("./json");e.HTML=a("./html");e.List=a("./list");e.Spec=a("./spec");e.Progress=a("./progress");e.Landing=a("./landing");e.JSONCov=a("./json-cov");e.HTMLCov=a("./html-cov");e.JSONStream=a("./json-stream");e.XUnit=a("./xunit")});j.register("reporters/json-cov.js",function(i,e,a){function b(d,f){var c={filename:d,coverage:0,hits:0,misses:0,sloc:0,source:{}};f.source.forEach(function(d,
a){a++;0===f[a]?(c.misses++,c.sloc++):void 0!==f[a]&&(c.hits++,c.sloc++);c.source[a]={source:d,coverage:void 0===f[a]?"":f[a]}});c.coverage=100*(c.hits/c.sloc);return c}function h(d){return{title:d.title,fullTitle:d.fullTitle(),duration:d.duration}}var g=a("./base");i.exports=function(d,f){var c=this,f=1==arguments.length?!0:f;g.call(this,d);var a=[],e=[],i=[];d.on("test end",function(c){a.push(c)});d.on("pass",function(c){i.push(c)});d.on("fail",function(c){e.push(c)});d.on("end",function(){var d=
global._$jscoverage||{},g={instrumentation:"node-jscoverage",sloc:0,hits:0,misses:0,coverage:0,files:[]},j;for(j in d){var m=b(j,d[j]);g.files.push(m);g.hits+=m.hits;g.misses+=m.misses;g.sloc+=m.sloc}0<g.sloc&&(g.coverage=100*(g.hits/g.sloc));d=c.cov=g;d.stats=c.stats;d.tests=a.map(h);d.failures=e.map(h);d.passes=i.map(h);f&&process.stdout.write(JSON.stringify(d,null,2))})}});j.register("reporters/json-stream.js",function(i,e,a){function b(a){return{title:a.title,fullTitle:a.fullTitle(),duration:a.duration}}
var h=a("./base");i.exports=function(a){h.call(this,a);var d=this,f=a.total;a.on("start",function(){console.log(JSON.stringify(["start",{total:f}]))});a.on("pass",function(c){console.log(JSON.stringify(["pass",b(c)]))});a.on("fail",function(c){console.log(JSON.stringify(["fail",b(c)]))});a.on("end",function(){process.stdout.write(JSON.stringify(["end",d.stats]))})}});j.register("reporters/json.js",function(i,e,a){function b(a){return{title:a.title,fullTitle:a.fullTitle(),duration:a.duration}}var h=
a("./base");i.exports=function(a){var d=this;h.call(this,a);var f=[],c=[],e=[];a.on("test end",function(c){f.push(c)});a.on("pass",function(c){e.push(c)});a.on("fail",function(d){c.push(d)});a.on("end",function(){var a={stats:d.stats,tests:f.map(b),failures:c.map(b),passes:e.map(b)};process.stdout.write(JSON.stringify(a,null,2))})}});j.register("reporters/landing.js",function(i,e,a){function b(a){function c(){var c=Array(e).join("-");return" "+d("runway",c)}h.call(this,a);var b=this,e=0.75*h.window.width|
0,i=a.total,j=process.stdout,s=d("plane","\u2708"),o=-1,m=0;a.on("start",function(){j.write("\n ");g.hide()});a.on("test end",function(a){var f=-1==o?e*++m/i|0:o;"failed"==a.state&&(s=d("plane crash","\u2708"),o=f);j.write("\u001b[4F\n\n");j.write(c());j.write("\n ");j.write(d("runway",Array(f).join("\u22c5")));j.write(s);j.write(d("runway",Array(e-f).join("\u22c5")+"\n"));j.write(c());j.write("\u001b[0m")});a.on("end",function(){g.show();console.log();b.epilogue()})}var h=a("./base"),g=h.cursor,
d=h.color;i.exports=b;h.colors.plane=0;h.colors["plane crash"]=31;h.colors.runway=90;b.prototype=new h;b.prototype.constructor=b});j.register("reporters/list.js",function(i,e,a){function b(a){h.call(this,a);var c=0;a.on("start",function(){console.log()});a.on("test",function(c){process.stdout.write(d("pass"," "+c.fullTitle()+": "))});a.on("pending",function(c){var a=d("checkmark"," -")+d("pending"," %s");console.log(a,c.fullTitle())});a.on("pass",function(c){var a=d("checkmark"," \u2713")+d("pass",
" %s: ")+d(c.speed,"%dms");g.CR();console.log(a,c.fullTitle(),c.duration)});a.on("fail",function(a){g.CR();console.log(d("fail"," %d) %s"),++c,a.fullTitle())});a.on("end",this.epilogue.bind(this))}var h=a("./base"),g=h.cursor,d=h.color;i.exports=b;b.prototype=new h;b.prototype.constructor=b});j.register("reporters/progress.js",function(i,e,a){function b(a,c){h.call(this,a);var b=this,c=c||{},e=0.5*h.window.width|0,i=a.total,j=0;c.open=c.open||"[";c.complete=c.complete||"\u25ac";c.incomplete=c.incomplete||
"\u22c5";c.close=c.close||"]";c.verbose=!1;a.on("start",function(){console.log();g.hide()});a.on("test end",function(){var a=j++/i,a=e*a|0,f=e-a;g.CR();process.stdout.write("\u001b[J");process.stdout.write(d("progress"," "+c.open));process.stdout.write(Array(a).join(c.complete));process.stdout.write(Array(f).join(c.incomplete));process.stdout.write(d("progress",c.close));c.verbose&&process.stdout.write(d("progress"," "+j+" of "+i))});a.on("end",function(){g.show();console.log();b.epilogue()})}var h=
a("./base"),g=h.cursor,d=h.color;i.exports=b;h.colors.progress=90;b.prototype=new h;b.prototype.constructor=b});j.register("reporters/spec.js",function(i,e,a){function b(a){function c(){return Array(b).join(" ")}h.call(this,a);var b=0,e=0;a.on("start",function(){console.log()});a.on("suite",function(a){++b;console.log(d("suite","%s%s"),c(),a.title)});a.on("suite end",function(){--b;1==b&&console.log()});a.on("test",function(a){process.stdout.write(c()+d("pass"," \u25e6 "+a.title+": "))});a.on("pending",
function(a){var f=c()+d("pending"," - %s");console.log(f,a.title)});a.on("pass",function(a){if("fast"==a.speed){var f=c()+d("checkmark"," \u2713")+d("pass"," %s ");g.CR();console.log(f,a.title)}else f=c()+d("checkmark"," \u2713")+d("pass"," %s ")+d(a.speed,"(%dms)"),g.CR(),console.log(f,a.title,a.duration)});a.on("fail",function(a){g.CR();console.log(c()+d("fail"," %d) %s"),++e,a.title)});a.on("end",this.epilogue.bind(this))}var h=a("./base"),g=h.cursor,d=h.color;i.exports=b;b.prototype=new h;
b.prototype.constructor=b});j.register("reporters/tap.js",function(i,e,a){var b=a("./base");i.exports=function(a){b.call(this,a);var e=a.total,d=1;a.on("start",function(){console.log("%d..%d",1,e)});a.on("test end",function(){++d});a.on("pending",function(a){console.log("ok %d %s # SKIP -",d,a.fullTitle().replace(/#/g,""))});a.on("pass",function(a){console.log("ok %d %s",d,a.fullTitle().replace(/#/g,""))});a.on("fail",function(a,c){console.log("not ok %d %s",d,a.fullTitle().replace(/#/g,""));console.log(c.stack.replace(/^/gm,
" "))})}});j.register("reporters/teamcity.js",function(i,e,a){function b(a){return a.replace(/'/g,"|'")}var h=a("./base");i.exports=function(a){h.call(this,a);var d=this.stats;a.on("start",function(){console.log("##teamcity[testSuiteStarted name='mocha.suite']")});a.on("test",function(a){console.log("##teamcity[testStarted name='%s']",b(a.fullTitle()))});a.on("fail",function(a,c){console.log("##teamcity[testFailed name='%s' message='%s']",b(a.fullTitle()),b(c.message))});a.on("pending",function(a){console.log("##teamcity[testIgnored name='%s' message='pending']",
b(a.fullTitle()))});a.on("test end",function(a){console.log("##teamcity[testFinished name='%s' duration='%s']",b(a.fullTitle()),a.duration)});a.on("end",function(){console.log("##teamcity[testSuiteFinished name='mocha.suite' duration='%s']",d.duration)})}});j.register("reporters/xunit.js",function(i,e,a){function b(c){d.call(this,c);var a=this.stats,f=[];c.on("test end",function(c){f.push(c)});c.on("end",function(){console.log(g("testsuite",{name:"Mocha Tests",tests:a.tests,failures:a.failures,errors:a.failures,
skip:a.tests-a.failures-a.passes,timestamp:(new Date).toUTCString(),time:a.duration/1E3},!1));f.forEach(h);console.log("</testsuite>")})}function h(c){var a={classname:c.parent.fullTitle(),name:c.title,time:c.duration/1E3};"failed"==c.state?(c=c.err,a.message=f(c.message),console.log(g("testcase",a,!1,g("failure",a,!1,"<![CDATA["+f(c.stack)+"]]\>")))):c.pending?console.log(g("testcase",a,!1,g("skipped",{},!0))):console.log(g("testcase",a,!0))}function g(c,a,d,b){var d=d?"/>":">",e=[],g;for(g in a)e.push(g+
'="'+f(a[g])+'"');a="<"+c+(e.length?" "+e.join(" "):"")+d;b&&(a+=b+"</"+c+d);return a}var d=a("./base"),f=a("../utils").escape;i.exports=b;b.prototype=new d;b.prototype.constructor=b});j.register("runnable.js",function(i,e,a){function b(a,d){this.title=a;this.async=(this.fn=d)&&d.length;this.sync=!this.async;this._timeout=2E3;this.timedOut=!1}var e=a("browser/events").EventEmitter,h=a("browser/debug")("runnable");i.exports=b;b.prototype=new e;b.prototype.constructor=b;b.prototype.timeout=function(a){if(0==
arguments.length)return this._timeout;h("timeout %d",a);this._timeout=a;this.timer&&this.resetTimeout();return this};b.prototype.fullTitle=function(){return this.parent.fullTitle()+" "+this.title};b.prototype.clearTimeout=function(){clearTimeout(this.timer)};b.prototype.resetTimeout=function(){var a=this,d=this.timeout();this.clearTimeout();d&&(this.timer=setTimeout(function(){a.callback(Error("timeout of "+d+"ms exceeded"));a.timedOut=!0},d))};b.prototype.run=function(a){function d(c){if(!f.timedOut){if(h){var d;
i?d=void 0:(i=!0,f.emit("error",Error("done() called multiple times")));return d}f.clearTimeout();f.duration=new Date-b;h=!0;a(c)}}var f=this,c=this.timeout(),b=new Date,e=this.ctx,h,i;this.async&&c&&(this.timer=setTimeout(function(){d(Error("timeout of "+c+"ms exceeded"));f.timedOut=!0},c));this.callback=d;if(this.async)try{this.fn.call(e,function(c){if(c instanceof Error)return d(c);if(null!=c)return d(Error("done() invoked with non-Error: "+c));d()})}catch(j){d(j)}else try{this.pending||this.fn.call(e),
this.duration=new Date-b,a()}catch(o){a(o)}}});j.register("runner.js",function(i,e,a){function b(a){var f=this;this._globals=[];this.suite=a;this.total=a.total();this.failures=0;this.on("test end",function(c){f.checkGlobals(c)});this.on("hook end",function(c){f.checkGlobals(c)});this.grep(/.*/);this.globals(g.keys(global).concat(["errno"]))}var e=a("browser/events").EventEmitter,h=a("browser/debug")("runner");a("./test");var g=a("./utils");i.exports=b;b.prototype=new e;b.prototype.constructor=b;b.prototype.grep=
function(a){h("grep %s",a);this._grep=a;return this};b.prototype.globals=function(a){if(0==arguments.length)return this._globals;h("globals %j",a);g.forEach(a,function(a){this._globals.push(a)},this);return this};b.prototype.checkGlobals=function(a){if(!this.ignoreLeaks){var f=g.filter(g.keys(global),function(a){return!~g.indexOf(this._globals,a)&&(!global.navigator||"onerror"!==a)},this);this._globals=this._globals.concat(f);1<f.length?this.fail(a,Error("global leaks detected: "+f.join(", ")+"")):
f.length&&this.fail(a,Error("global leak detected: "+f[0]))}};b.prototype.fail=function(a,f){++this.failures;a.state="failed";this.emit("fail",a,f)};b.prototype.failHook=function(a,f){this.fail(a,f);this.emit("end")};b.prototype.hook=function(a,f){function c(a){var d=b[a];if(!d)return f();e.currentRunnable=d;d.ctx.test(e.test);e.emit("hook",d);d.on("error",function(a){e.failHook(d,a)});d.run(function(b){d.removeAllListeners("error");if(b)return e.failHook(d,b);e.emit("hook end",d);c(++a)})}var b=
this.suite["_"+a],e=this;process.nextTick(function(){c(0)})};b.prototype.hooks=function(a,b,c){function e(i){g.suite=i;if(!i)return g.suite=h,c();g.hook(a,function(a){if(a)return g.suite=h,c(a);e(b.pop())})}var g=this,h=this.suite;e(b.pop())};b.prototype.hookUp=function(a,b){var c=[this.suite].concat(this.parents()).reverse();this.hooks(a,c,b)};b.prototype.hookDown=function(a,b){var c=[this.suite].concat(this.parents());this.hooks(a,c,b)};b.prototype.parents=function(){for(var a=this.suite,b=[];a=
a.parent;)b.push(a);return b};b.prototype.runTest=function(a){var b=this.test,c=this;try{b.ctx.test(b),b.on("error",function(a){c.fail(b,a)}),b.run(a)}catch(e){a(e)}};b.prototype.runTests=function(a,b){function c(){if(e.failures&&a._bail)return b();h=g.shift();if(!h)return b();if(!e._grep.test(h.fullTitle()))return c();if(h.pending)return e.emit("pending",h),e.emit("test end",h),c();e.emit("test",e.test=h);e.hookDown("beforeEach",function(){e.currentRunnable=e.test;e.runTest(function(a){h=e.test;
if(a)return e.fail(h,a),e.emit("test end",h),e.hookUp("afterEach",c);h.state="passed";e.emit("pass",h);e.emit("test end",h);e.hookUp("afterEach",c)})})}var e=this,g=a.tests,h;this.next=c;c()};b.prototype.runSuite=function(a,b){function c(){var b=a.suites[i++];if(!b)return e();g.runSuite(b,c)}function e(){g.suite=a;g.hook("afterAll",function(){g.emit("suite end",a);b()})}var g=this,i=0;h("run suite %s",a.fullTitle());this.emit("suite",this.suite=a);this.hook("beforeAll",function(){g.runTests(a,c)})};
b.prototype.uncaught=function(a){h("uncaught exception");var b=this.currentRunnable;"failed"!=b.state&&(b.clearTimeout(),a.uncaught=!0,this.fail(b,a),"test"==b.type?(this.emit("test end",b),this.hookUp("afterEach",this.next)):this.emit("end"))};b.prototype.run=function(a){var b=this,a=a||function(){};h("start");this.on("end",function(){h("end");process.removeListener("uncaughtException",this.uncaught);a(b.failures)});this.emit("start");this.runSuite(this.suite,function(){h("finished running");b.emit("end")});
process.on("uncaughtException",function(a){b.uncaught(a)});return this}});j.register("suite.js",function(i,e,a){function b(a,d){this.title=a;this.ctx=d;this.suites=[];this.tests=[];this._beforeEach=[];this._beforeAll=[];this._afterEach=[];this._afterAll=[];this.root=!a;this._timeout=2E3;this._bail=!1}var h=a("browser/events").EventEmitter,g=a("browser/debug")("suite"),d=a("./utils"),f=a("./hook"),e=i.exports=b;e.create=function(a,d){var e=new b(d,a.ctx);e.parent=a;e.fullTitle();a.addSuite(e);return e};
b.prototype=new h;b.prototype.constructor=b;b.prototype.clone=function(){var a=new b(this.title);g("clone");a.ctx=this.ctx;a.timeout(this.timeout());a.bail(this.bail());return a};b.prototype.timeout=function(a){if(0==arguments.length)return this._timeout;(""+a).match(/s$/)&&(a=1E3*parseFloat(a));g("timeout %d",a);this._timeout=parseInt(a,10);return this};b.prototype.bail=function(a){if(0==arguments.length)return this._bail;g("bail %s",a);this._bail=a;return this};b.prototype.beforeAll=function(a){a=
new f('"before all" hook',a);a.parent=this;a.timeout(this.timeout());a.ctx=this.ctx;this._beforeAll.push(a);this.emit("beforeAll",a);return this};b.prototype.afterAll=function(a){a=new f('"after all" hook',a);a.parent=this;a.timeout(this.timeout());a.ctx=this.ctx;this._afterAll.push(a);this.emit("afterAll",a);return this};b.prototype.beforeEach=function(a){a=new f('"before each" hook',a);a.parent=this;a.timeout(this.timeout());a.ctx=this.ctx;this._beforeEach.push(a);this.emit("beforeEach",a);return this};
b.prototype.afterEach=function(a){a=new f('"after each" hook',a);a.parent=this;a.timeout(this.timeout());a.ctx=this.ctx;this._afterEach.push(a);this.emit("afterEach",a);return this};b.prototype.addSuite=function(a){a.parent=this;a.timeout(this.timeout());a.bail(this.bail());this.suites.push(a);this.emit("suite",a);return this};b.prototype.addTest=function(a){a.parent=this;a.timeout(this.timeout());a.ctx=this.ctx;this.tests.push(a);this.emit("test",a);return this};b.prototype.fullTitle=function(){if(this.parent){var a=
this.parent.fullTitle();if(a)return a+" "+this.title}return this.title};b.prototype.total=function(){return d.reduce(this.suites,function(a,d){return a+d.total()},0)+this.tests.length}});j.register("test.js",function(i,e,a){function b(a,d){h.call(this,a,d);this.pending=!d;this.type="test"}var h=a("./runnable");i.exports=b;b.prototype=new h;b.prototype.constructor=b;b.prototype.inspect=function(){return JSON.stringify(this,function(a,d){return"_"==a[0]?void 0:"parent"==a?"#<Suite>":d},2)}});j.register("utils.js",
function(i,e,a){function b(a){return!~f.indexOf(a)}var h=a("browser/fs"),g=a("browser/path").join,d=a("browser/debug")("watch"),f=["node_modules",".git"];e.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};e.forEach=function(a,d,b){for(var e=0,f=a.length;e<f;e++)d.call(b,a[e],e)};e.indexOf=function(a,d,b){for(var b=b||0,e=a.length;b<e;b++)if(a[b]===d)return b;return-1};e.reduce=function(a,d,b,e){for(var f=0,g=a.length;f<g;f++)b=
d.call(e,b,a[f],f,a);return b};e.filter=function(a,d,b){for(var e=[],f=0,g=a.length;f<g;f++){var h=a[f];d.call(b,h,f,a)&&e.push(h)}return e};e.keys=Object.keys||function(a){var d=[],b=Object.prototype.hasOwnProperty,e;for(e in a)b.call(a,e)&&d.push(e);return d};e.watch=function(a,b){var e={interval:100};a.forEach(function(a){d("file %s",a);h.watchFile(a,e,function(c,d){d.mtime<c.mtime&&b(a)})})};e.files=function(a,d){d=d||[];h.readdirSync(a).filter(b).forEach(function(b){b=g(a,b);h.statSync(b).isDirectory()?
e.files(b,d):b.match(/\.(js|coffee)$/)&&d.push(b)});return d}});process={exit:function(){},stdout:{}};global=window;process.nextTick=function(){if(window.ActiveXObject||!window.postMessage)return function(e){e()};var i=[];return function(e){i.push(e);window.postMessage("mocha-zero-timeout","*");window.addEventListener("message",function(a){a.source==window&&"mocha-zero-timeout"==a.data&&(a.stopPropagation&&a.stopPropagation(),i.length&&i.shift()())},!0)}}();process.removeListener=function(i){"uncaughtException"==
i&&(window.onerror=null)};process.on=function(i,e){"uncaughtException"==i&&(window.onerror=e)};window.mocha=j("mocha");(function(){function i(){for(var a=document.getElementsByTagName("code"),b=0,d=a.length;b<d;++b)a[b].innerHTML=a[b].innerHTML.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\/\/(.*)/gm,'<span class="comment">//$1</span>').replace(/('.*?')/gm,'<span class="string">$1</span>').replace(/(\d+\.\d+)/gm,'<span class="number">$1</span>').replace(/(\d+)/gm,'<span class="number">$1</span>').replace(/\bnew *(\w+)/gm,
'<span class="keyword">new</span> <span class="init">$1</span>').replace(/\b(function|new|throw|return|var|if|else)\b/gm,'<span class="keyword">$1</span>')}function e(a){return b.reduce(a.replace("?","").split("&"),function(a,d){var b=d.indexOf("="),c=d.slice(0,b),b=d.slice(++b);a[c]=decodeURIComponent(b);return a},{})}var a=new mocha.Suite("",new mocha.Context),b=mocha.utils;mocha.setup=function(b){b=mocha.interfaces[b];if(!b)throw Error('invalid mocha interface "'+b+'"');b(a);a.emit("pre-require",
window)};mocha.run=function(b){a.emit("run");var g=new mocha.Runner(a),b=b||mocha.reporters.HTML;new b(g);b=e(window.location.search||"");b.grep&&g.grep(RegExp(b.grep));g.on("end",i);return g.run()}})()})();
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment