Browse Source

[build]

master
Muthu Kumar 6 years ago
parent
commit
566a9b4d5f
  1. 137
      es5/dist.js
  2. 108
      es5/index.js

137
es5/dist.js

@ -1,81 +1,82 @@
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var h=1;h<arguments.length;h++){var d=arguments[h];if(d)for(var f in d)$jscomp.owns(d,f)&&(a[f]=d[f])}return a};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var h=1;h<arguments.length;h++){var e=arguments[h];if(e)for(var d in e)$jscomp.owns(e,d)&&(a[d]=e[d])}return a};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,h){a!=Array.prototype&&a!=Object.prototype&&(a[b]=h.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,h,d){if(b){h=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var f=a[d];f in h||(h[f]={});h=h[f]}a=a[a.length-1];d=h[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(h,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.polyfill=function(a,b,h,e){if(b){h=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];d in h||(h[d]={});h=h[d]}a=a[a.length-1];e=h[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(h,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.Symbol=function(){var a=0;return function(b){return $jscomp.SYMBOL_PREFIX+(b||"")+a++}}();$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.polyfill("Array.from",function(a){return a?a:function(a,h,d){$jscomp.initSymbolIterator();h=null!=h?h:function(c){return c};var b=[],l=a[Symbol.iterator];if("function"==typeof l){a=l.call(a);for(var c=0;!(l=a.next()).done;)b.push(h.call(d,l.value,c++))}else for(l=a.length,c=0;c<l;c++)b.push(h.call(d,a[c],c));return b}},"es6","es3");
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var h=0,d={next:function(){if(h<a.length){var f=h++;return{value:b(f,a[f]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.polyfill("Array.from",function(a){return a?a:function(a,h,e){$jscomp.initSymbolIterator();h=null!=h?h:function(c){return c};var b=[],l=a[Symbol.iterator];if("function"==typeof l){a=l.call(a);for(var c=0;!(l=a.next()).done;)b.push(h.call(e,l.value,c++))}else for(l=a.length,c=0;c<l;c++)b.push(h.call(e,a[c],c));return b}},"es6","es3");
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var h=0,e={next:function(){if(h<a.length){var d=h++;return{value:b(d,a[d]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(a){function b(){this.batch_=null}function h(c){return c instanceof f?c:new f(function(a,k){a(c)})}if(a&&!$jscomp.FORCE_POLYFILL_PROMISE)return a;b.prototype.asyncExecute=function(c){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(c);return this};b.prototype.asyncExecuteBatch_=function(){var c=this;this.asyncExecuteFunction(function(){c.executeBatch_()})};var d=$jscomp.global.setTimeout;b.prototype.asyncExecuteFunction=function(c){d(c,
0)};b.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var c=this.batch_;this.batch_=[];for(var a=0;a<c.length;++a){var k=c[a];c[a]=null;try{k()}catch(e){this.asyncThrow_(e)}}}this.batch_=null};b.prototype.asyncThrow_=function(c){this.asyncExecuteFunction(function(){throw c;})};var f=function(c){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var a=this.createResolveAndReject_();try{c(a.resolve,a.reject)}catch(k){a.reject(k)}};f.prototype.createResolveAndReject_=
function(){function c(c){return function(e){k||(k=!0,c.call(a,e))}}var a=this,k=!1;return{resolve:c(this.resolveTo_),reject:c(this.reject_)}};f.prototype.resolveTo_=function(c){if(c===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof f)this.settleSameAsPromise_(c);else{a:switch(typeof c){case "object":var a=null!=c;break a;case "function":a=!0;break a;default:a=!1}a?this.resolveToNonPromiseObj_(c):this.fulfill_(c)}};f.prototype.resolveToNonPromiseObj_=function(c){var a=
void 0;try{a=c.then}catch(k){this.reject_(k);return}"function"==typeof a?this.settleSameAsThenable_(a,c):this.fulfill_(c)};f.prototype.reject_=function(a){this.settle_(2,a)};f.prototype.fulfill_=function(a){this.settle_(1,a)};f.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};f.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=
0;a<this.onSettledCallbacks_.length;++a)l.asyncExecute(this.onSettledCallbacks_[a]);this.onSettledCallbacks_=null}};var l=new b;f.prototype.settleSameAsPromise_=function(a){var c=this.createResolveAndReject_();a.callWhenSettled_(c.resolve,c.reject)};f.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(e){c.reject(e)}};f.prototype.then=function(a,b){function c(a,c){return"function"==typeof a?function(c){try{e(a(c))}catch(q){g(q)}}:
c}var e,g,d=new f(function(a,c){e=a;g=c});this.callWhenSettled_(c(a,e),c(b,g));return d};f.prototype.catch=function(a){return this.then(void 0,a)};f.prototype.callWhenSettled_=function(a,b){function c(){switch(e.state_){case 1:a(e.result_);break;case 2:b(e.result_);break;default:throw Error("Unexpected state: "+e.state_);}}var e=this;null==this.onSettledCallbacks_?l.asyncExecute(c):this.onSettledCallbacks_.push(c)};f.resolve=h;f.reject=function(a){return new f(function(c,b){b(a)})};f.race=function(a){return new f(function(c,
b){for(var e=$jscomp.makeIterator(a),k=e.next();!k.done;k=e.next())h(k.value).callWhenSettled_(c,b)})};f.all=function(a){var c=$jscomp.makeIterator(a),b=c.next();return b.done?h([]):new f(function(a,k){function e(c){return function(e){g[c]=e;m--;0==m&&a(g)}}var g=[],m=0;do g.push(void 0),m++,h(b.value).callWhenSettled_(e(g.length-1),k),b=c.next();while(!b.done)})};return f},"es6","es3");$jscomp.polyfill("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}},"es6","es5");
$jscomp.polyfill("Reflect.ownKeys",function(a){return a?a:function(a){var b=[],d=Object.getOwnPropertyNames(a);a=Object.getOwnPropertySymbols(a);for(var f=0;f<d.length;f++)("jscomp_symbol_"==d[f].substring(0,14)?a:b).push(d[f]);return b.concat(a)}},"es6","es5");$jscomp.findInternal=function(a,b,h){a instanceof String&&(a=String(a));for(var d=a.length,f=0;f<d;f++){var l=a[f];if(b.call(h,l,f,a))return{i:f,v:l}}return{i:-1,v:void 0}};
$jscomp.polyfill("Promise",function(a){function b(){this.batch_=null}function h(c){return c instanceof d?c:new d(function(a,b){a(c)})}if(a&&!$jscomp.FORCE_POLYFILL_PROMISE)return a;b.prototype.asyncExecute=function(c){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(c);return this};b.prototype.asyncExecuteBatch_=function(){var c=this;this.asyncExecuteFunction(function(){c.executeBatch_()})};var e=$jscomp.global.setTimeout;b.prototype.asyncExecuteFunction=function(c){e(c,
0)};b.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var c=this.batch_;this.batch_=[];for(var a=0;a<c.length;++a){var b=c[a];c[a]=null;try{b()}catch(f){this.asyncThrow_(f)}}}this.batch_=null};b.prototype.asyncThrow_=function(c){this.asyncExecuteFunction(function(){throw c;})};var d=function(c){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var a=this.createResolveAndReject_();try{c(a.resolve,a.reject)}catch(k){a.reject(k)}};d.prototype.createResolveAndReject_=
function(){function a(a){return function(c){k||(k=!0,a.call(b,c))}}var b=this,k=!1;return{resolve:a(this.resolveTo_),reject:a(this.reject_)}};d.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof d)this.settleSameAsPromise_(a);else{a:switch(typeof a){case "object":var c=null!=a;break a;case "function":c=!0;break a;default:c=!1}c?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};d.prototype.resolveToNonPromiseObj_=function(a){var c=
void 0;try{c=a.then}catch(k){this.reject_(k);return}"function"==typeof c?this.settleSameAsThenable_(c,a):this.fulfill_(a)};d.prototype.reject_=function(a){this.settle_(2,a)};d.prototype.fulfill_=function(a){this.settle_(1,a)};d.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};d.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=
0;a<this.onSettledCallbacks_.length;++a)l.asyncExecute(this.onSettledCallbacks_[a]);this.onSettledCallbacks_=null}};var l=new b;d.prototype.settleSameAsPromise_=function(a){var c=this.createResolveAndReject_();a.callWhenSettled_(c.resolve,c.reject)};d.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(f){c.reject(f)}};d.prototype.then=function(a,b){function c(a,c){return"function"==typeof a?function(c){try{f(a(c))}catch(q){g(q)}}:
c}var f,g,e=new d(function(a,c){f=a;g=c});this.callWhenSettled_(c(a,f),c(b,g));return e};d.prototype.catch=function(a){return this.then(void 0,a)};d.prototype.callWhenSettled_=function(a,b){function c(){switch(f.state_){case 1:a(f.result_);break;case 2:b(f.result_);break;default:throw Error("Unexpected state: "+f.state_);}}var f=this;null==this.onSettledCallbacks_?l.asyncExecute(c):this.onSettledCallbacks_.push(c)};d.resolve=h;d.reject=function(a){return new d(function(c,b){b(a)})};d.race=function(a){return new d(function(c,
b){for(var f=$jscomp.makeIterator(a),k=f.next();!k.done;k=f.next())h(k.value).callWhenSettled_(c,b)})};d.all=function(a){var c=$jscomp.makeIterator(a),b=c.next();return b.done?h([]):new d(function(a,k){function f(c){return function(f){g[c]=f;m--;0==m&&a(g)}}var g=[],m=0;do g.push(void 0),m++,h(b.value).callWhenSettled_(f(g.length-1),k),b=c.next();while(!b.done)})};return d},"es6","es3");$jscomp.polyfill("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}},"es6","es5");
$jscomp.polyfill("Reflect.ownKeys",function(a){return a?a:function(a){var b=[],e=Object.getOwnPropertyNames(a);a=Object.getOwnPropertySymbols(a);for(var d=0;d<e.length;d++)("jscomp_symbol_"==e[d].substring(0,14)?a:b).push(e[d]);return b.concat(a)}},"es6","es5");$jscomp.findInternal=function(a,b,h){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var l=a[d];if(b.call(h,l,d,a))return{i:d,v:l}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,h){return $jscomp.findInternal(this,a,h).v}},"es6","es3");$jscomp.polyfill("Array.prototype.findIndex",function(a){return a?a:function(a,h){return $jscomp.findInternal(this,a,h).i}},"es6","es3");
var _slicedToArray=function(){return function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var h=[],d=!0,f=!1,l=void 0;try{for(var c=a[Symbol.iterator](),g;!(d=(g=c.next()).done)&&(h.push(g.value),!b||h.length!==b);d=!0);}catch(k){f=!0,l=k}finally{try{if(!d&&c["return"])c["return"]()}finally{if(f)throw l;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),_createClass=function(){function a(a,h){for(var b=0;b<h.length;b++){var f=h[b];f.enumerable=
f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(a,f.key,f)}}return function(b,h,d){h&&a(b.prototype,h);d&&a(b,d);return b}}(),_extends2=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var h=arguments[b],d;for(d in h)Object.prototype.hasOwnProperty.call(h,d)&&(a[d]=h[d])}return a},_typeof2="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&
var _slicedToArray=function(){return function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var h=[],e=!0,d=!1,l=void 0;try{for(var c=a[Symbol.iterator](),g;!(e=(g=c.next()).done)&&(h.push(g.value),!b||h.length!==b);e=!0);}catch(k){d=!0,l=k}finally{try{if(!e&&c["return"])c["return"]()}finally{if(d)throw l;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),_createClass=function(){function a(a,h){for(var b=0;b<h.length;b++){var d=h[b];d.enumerable=
d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,h,e){h&&a(b.prototype,h);e&&a(b,e);return b}}(),_extends2=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var h=arguments[b],e;for(e in h)Object.prototype.hasOwnProperty.call(h,e)&&(a[e]=h[e])}return a},_typeof2="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&
a!==Symbol.prototype?"symbol":typeof a},_templateObject=_taggedTemplateLiteral([""," is not an array"],[""," is not an array"]),_templateObject2=_taggedTemplateLiteral([""," is not an object"],[""," is not an object"]),_templateObject3=_taggedTemplateLiteral([""," doesn't have length ",""],[""," doesn't have length ",""]),_templateObject4=_taggedTemplateLiteral([""," is not equal to ",""],[""," is not equal to ",""]),_templateObject5=_taggedTemplateLiteral([""," is not deeply equal to ",""],[""," is not deeply equal to ",
""]),_templateObject6=_taggedTemplateLiteral([""," does not contain ",""],[""," does not contain ",""]),_templateObject7=_taggedTemplateLiteral([""," is not true"],[""," is not true"]),_templateObject8=_taggedTemplateLiteral([""," is not false"],[""," is not false"]),_templateObject9=_taggedTemplateLiteral([""," does not have property '","'"],[""," does not have property '","'"]),_templateObject10=_taggedTemplateLiteral(["<","> does not exist in ",""],["<","> does not exist in ",""]),_templateObject11=
""]),_templateObject6=_taggedTemplateLiteral([""," does not contain ",""],[""," does not contain ",""]),_templateObject7=_taggedTemplateLiteral([""," is not true"],[""," is not true"]),_templateObject8=_taggedTemplateLiteral([""," is not false"],[""," is not false"]),_templateObject9=_taggedTemplateLiteral([""," does not have property '","'"],[""," does not have property '","'"]),_templateObject10=_taggedTemplateLiteral([""," does not exist in ",""],[""," does not exist in ",""]),_templateObject11=
_taggedTemplateLiteral([""," is not a promise"],[""," is not a promise"]),_templateObject12=_taggedTemplateLiteral(["'","' does not resolve to '","'"],["'","' does not resolve to '","'"]),_templateObject13=_taggedTemplateLiteral(["'","' is not of type '","'"],["'","' is not of type '","'"]),_templateObject14=_taggedTemplateLiteral(["'","' is not greater than ",""],["'","' is not greater than ",""]),_templateObject15=_taggedTemplateLiteral(["'","' is not less than ",""],["'","' is not less than ",
""]),_templateObject16=_taggedTemplateLiteral(["'","' is less than ",""],["'","' is less than ",""]),_templateObject17=_taggedTemplateLiteral(["'","' is greater than ",""],["'","' is greater than ",""]);function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?a:b}
function _inherits(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function _taggedTemplateLiteral(a,b){return Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
function _toArray(a){return Array.isArray(a)?a:Array.from(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function _defineProperty2(a,b,h){b in a?Object.defineProperty(a,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):a[b]=h;return a}function _toConsumableArray2(a){if(Array.isArray(a)){for(var b=0,h=Array(a.length);b<a.length;b++)h[b]=a[b];return h}return Array.from(a)}
(function(a){"object"===("undefined"===typeof exports?"undefined":_typeof2(exports))&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Gunner=a()})(function(){return function(){function a(b,h,d){function f(c,k){if(!h[c]){if(!b[c]){var e="function"==typeof require&&require;if(!k&&e)return e(c,!0);if(l)return l(c,!0);k=Error("Cannot find module '"+
c+"'");throw k.code="MODULE_NOT_FOUND",k;}k=h[c]={exports:{}};b[c][0].call(k.exports,function(a){return f(b[c][1][a]||a)},k,k.exports,a,b,h,d)}return h[c].exports}for(var l="function"==typeof require&&require,c=0;c<d.length;c++)f(d[c]);return f}return a}()({1:[function(a,b,h){b.exports=a("../src/gunner")},{"../src/gunner":8}],2:[function(a,b,h){(function(d){(function(a){"object"===("undefined"===typeof h?"undefined":_typeof2(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:
"undefined"!==typeof d?d:"undefined"!==typeof self?self:this).isEq=a()})(function(){return function(){function b(f,c,g){function k(m,d){if(!c[m]){if(!f[m]){var l="function"==typeof a&&a;if(!d&&l)return l(m,!0);if(e)return e(m,!0);d=Error("Cannot find module '"+m+"'");throw d.code="MODULE_NOT_FOUND",d;}d=c[m]={exports:{}};f[m][0].call(d.exports,function(a){var c=f[m][1][a];return k(c?c:a)},d,d.exports,b,f,c,g)}return c[m].exports}for(var e="function"==typeof a&&a,m=0;m<g.length;m++)k(g[m]);return k}
(function(a){"object"===("undefined"===typeof exports?"undefined":_typeof2(exports))&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Gunner=a()})(function(){return function(){function a(b,h,e){function d(c,k){if(!h[c]){if(!b[c]){var f="function"==typeof require&&require;if(!k&&f)return f(c,!0);if(l)return l(c,!0);k=Error("Cannot find module '"+
c+"'");throw k.code="MODULE_NOT_FOUND",k;}k=h[c]={exports:{}};b[c][0].call(k.exports,function(a){return d(b[c][1][a]||a)},k,k.exports,a,b,h,e)}return h[c].exports}for(var l="function"==typeof require&&require,c=0;c<e.length;c++)d(e[c]);return d}return a}()({1:[function(a,b,h){b.exports=a("../src/gunner")},{"../src/gunner":9}],2:[function(a,b,h){(function(e){(function(a){"object"===("undefined"===typeof h?"undefined":_typeof2(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:
"undefined"!==typeof e?e:"undefined"!==typeof self?self:this).isEq=a()})(function(){return function(){function b(e,c,g){function k(m,d){if(!c[m]){if(!e[m]){var l="function"==typeof a&&a;if(!d&&l)return l(m,!0);if(f)return f(m,!0);d=Error("Cannot find module '"+m+"'");throw d.code="MODULE_NOT_FOUND",d;}d=c[m]={exports:{}};e[m][0].call(d.exports,function(a){var c=e[m][1][a];return k(c?c:a)},d,d.exports,b,e,c,g)}return c[m].exports}for(var f="function"==typeof a&&a,m=0;m<g.length;m++)k(g[m]);return k}
return b}()({1:[function(a,b,c){var g="function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(a){return"undefined"===typeof a?"undefined":_typeof2(a)}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":"undefined"===typeof a?"undefined":_typeof2(a)};b.exports=function n(a,c,b){if(a===c)return!0;if(("undefined"===typeof a?"undefined":g(a))!==("undefined"===typeof c?"undefined":g(c))||Array.isArray(a)&&!Array.isArray(c)||Array.isArray(c)&&
!Array.isArray(a))return!1;if("number"===typeof a)return isNaN(a)&&isNaN(c)?!1:a===c;if("string"===typeof a||"boolean"===typeof a||null===a||void 0===a)return a===c;if(a instanceof RegExp)return String(a)===String(c);if("object"!==("undefined"===typeof a?"undefined":g(a))||"object"!==("undefined"===typeof c?"undefined":g(c)))return a===c;var e=Object.keys(a),m=Object.keys(c);if(!b&&(b=e,e.length!==m.length))return!1;if(!Array.isArray(b))throw Error("[isEq] third parameter should be an array of keys!");
if(0===b.length)return!0;for(var d in b)if(e=b[d],Array.isArray(a[e])&&Array.isArray(c[e])&&(e=d),a[e]!==c[e])if(g("object"===a[e])&&g("object"===c[e])||Array.isArray(a[e])&&Array.isArray(c[e])){if(!n(a[e],c[e]))return!1}else return!1;return!0}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],3:[function(a,b,h){(function(d){function f(a,c,b){c in a?Object.defineProperty(a,c,{value:b,enumerable:!0,configurable:!0,
!Array.isArray(a))return!1;if("number"===typeof a)return isNaN(a)&&isNaN(c)?!1:a===c;if("string"===typeof a||"boolean"===typeof a||null===a||void 0===a)return a===c;if(a instanceof RegExp)return String(a)===String(c);if("object"!==("undefined"===typeof a?"undefined":g(a))||"object"!==("undefined"===typeof c?"undefined":g(c)))return a===c;var f=Object.keys(a),d=Object.keys(c);if(!b&&(b=f,f.length!==d.length))return!1;if(!Array.isArray(b))throw Error("[isEq] third parameter should be an array of keys!");
if(0===b.length)return!0;for(var e in b)if(f=b[e],Array.isArray(a[f])&&Array.isArray(c[f])&&(f=e),a[f]!==c[f])if(g("object"===a[f])&&g("object"===c[f])||Array.isArray(a[f])&&Array.isArray(c[f])){if(!n(a[f],c[f]))return!1}else return!1;return!0}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],3:[function(a,b,h){(function(e){function d(a,c,b){c in a?Object.defineProperty(a,c,{value:b,enumerable:!0,configurable:!0,
writable:!0}):a[c]=b;return a}function l(a){if(Array.isArray(a)){for(var c=0,b=Array(a.length);c<a.length;c++)b[c]=a[c];return b}return Array.from(a)}var c=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],g;for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(a[g]=b[g])}return a},g="function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(a){return"undefined"===typeof a?"undefined":_typeof2(a)}:function(a){return a&&"function"===typeof Symbol&&a.constructor===
Symbol&&a!==Symbol.prototype?"symbol":"undefined"===typeof a?"undefined":_typeof2(a)};(function(a){"object"===("undefined"===typeof h?"undefined":g(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:"undefined"!==typeof d?d:"undefined"!==typeof self?self:this).promiseObject=a()})(function(){return function(){function c(b,g,d){function e(k,m){if(!g[k]){if(!b[k]){var l="function"==typeof a&&a;if(!m&&l)return l(k,!0);if(f)return f(k,!0);m=Error("Cannot find module '"+k+"'");
throw m.code="MODULE_NOT_FOUND",m;}m=g[k]={exports:{}};b[k][0].call(m.exports,function(a){return e(b[k][1][a]||a)},m,m.exports,c,b,g,d)}return g[k].exports}for(var f="function"==typeof a&&a,k=0;k<d.length;k++)e(d[k]);return e}return c}()({1:[function(a,c,b){c.exports=a("../index.js")},{"../index.js":2}],2:[function(a,b,d){var e=function(a){return a&&"object"===("undefined"===typeof a?"undefined":g(a))&&a.constructor===Object},k="undefined"!==typeof Symbol?Symbol("SELF"):"[~~//-- SELF --//~~]",m=function(a,
c){return function w(b){return Object.keys(b).reduce(function(g,k){var d=b[k];return d===c?(b[k]=a,[].concat(l(g),[k])):e(d)?[].concat(l(g),l(w(d,c))):g},[])}(a)},h=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},q=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};b.exports=function(a){var b=!1;return function w(g){return Promise.resolve(g).then(function(g){return Array.isArray(g)?
h(g,function(a){return w(a)}):e(g)?q(Object.keys(g).reduce(function(e,d){return g[d]===a?(b=!0,c({},e,f({},d,k))):c({},e,f({},d,w(g[d])))},{})):g})}(a).then(function(a){b&&m(a,k);return a})}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../index.js":4}],4:[function(a,b,h){var d=function(a){return a&&"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&a.constructor===Object},f="undefined"!==typeof Symbol?
Symbol("SELF"):"[~~//-- SELF --//~~]",l=function(a,c){return function n(b){return Object.keys(b).reduce(function(e,g){var k=b[g];return k===c?(b[g]=a,[].concat(_toConsumableArray2(e),[g])):d(k)?[].concat(_toConsumableArray2(e),_toConsumableArray2(n(k,c))):e},[])}(a)},c=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},g=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};
b.exports=function(a){var b=!1;return function n(e){return Promise.resolve(e).then(function(e){return Array.isArray(e)?c(e,function(a){return n(a)}):d(e)?g(Object.keys(e).reduce(function(c,g){return e[g]===a?(b=!0,_extends2({},c,_defineProperty2({},g,f))):_extends2({},c,_defineProperty2({},g,n(e[g])))},{})):e})}(a).then(function(a){b&&l(a,f);return a})}},{}],5:[function(a,b,h){function d(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=p(null),this._eventsCount=
0);this._maxListeners=this._maxListeners||void 0}function f(a,c,b,e){var g;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');if(g=a._events){g.newListener&&(a.emit("newListener",c,b.listener?b.listener:b),g=a._events);var f=g[c]}else g=a._events=p(null),a._eventsCount=0;f?("function"===typeof f?f=g[c]=e?[b,f]:[f,b]:e?f.unshift(b):f.push(b),f.warned||(b=void 0===a._maxListeners?d.defaultMaxListeners:a._maxListeners)&&0<b&&f.length>b&&(f.warned=!0,b=Error("Possible EventEmitter memory leak detected. "+
f.length+' "'+String(c)+'" listeners added. Use emitter.setMaxListeners() to increase limit.'),b.name="MaxListenersExceededWarning",b.emitter=a,b.type=c,b.count=f.length,"object"===("undefined"===typeof console?"undefined":_typeof2(console))&&console.warn&&console.warn("%s: %s",b.name,b.message))):(g[c]=b,++a._eventsCount);return a}function l(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,
arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var a=Array(arguments.length),c=0;c<a.length;++c)a[c]=arguments[c];this.listener.apply(this.target,a)}}function c(a,c,b){a={fired:!1,wrapFn:void 0,target:a,type:c,listener:b};c=q.call(l,a);c.listener=b;return a.wrapFn=c}function g(a,c,b){a=a._events;if(!a)return[];c=a[c];if(!c)return[];if("function"===typeof c)return b?
[c.listener||c]:[c];if(b)for(b=Array(c.length),a=0;a<b.length;++a)b[a]=c[a].listener||c[a];else b=e(c,c.length);return b}function k(a){var c=this._events;if(c){a=c[a];if("function"===typeof a)return 1;if(a)return a.length}return 0}function e(a,c){for(var b=Array(c),e=0;e<c;++e)b[e]=a[e];return b}function m(a){var c=function(){};c.prototype=a;return new c}function r(a){var c=[],b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return b}function n(a){var c=this;return function(){return c.apply(a,
arguments)}}var p=Object.create||m,t=Object.keys||r,q=Function.prototype.bind||n;b.exports=d;d.EventEmitter=d;d.prototype._events=void 0;d.prototype._maxListeners=void 0;var u=10;try{a={};Object.defineProperty&&Object.defineProperty(a,"x",{value:0});var v=0===a.x}catch(x){v=!1}v?Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(a){if("number"!==typeof a||0>a||a!==a)throw new TypeError('"defaultMaxListeners" must be a positive number');u=a}}):d.defaultMaxListeners=
u;d.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=a;return this};d.prototype.getMaxListeners=function(){return void 0===this._maxListeners?d.defaultMaxListeners:this._maxListeners};d.prototype.emit=function(a){var c,b,g;var d="error"===a;if(g=this._events)d=d&&null==g.error;else if(!d)return!1;if(d){1<arguments.length&&(c=arguments[1]);if(c instanceof Error)throw c;g=Error('Unhandled "error" event. ('+
c+")");g.context=c;throw g;}c=g[a];if(!c)return!1;g="function"===typeof c;var f=arguments.length;switch(f){case 1:if(g)c.call(this);else for(g=c.length,c=e(c,g),d=0;d<g;++d)c[d].call(this);break;case 2:d=arguments[1];if(g)c.call(this,d);else for(g=c.length,c=e(c,g),f=0;f<g;++f)c[f].call(this,d);break;case 3:d=arguments[1];f=arguments[2];if(g)c.call(this,d,f);else for(g=c.length,c=e(c,g),b=0;b<g;++b)c[b].call(this,d,f);break;case 4:d=arguments[1];f=arguments[2];b=arguments[3];if(g)c.call(this,d,f,
b);else{g=c.length;c=e(c,g);for(var k=0;k<g;++k)c[k].call(this,d,f,b)}break;default:d=Array(f-1);for(b=1;b<f;b++)d[b-1]=arguments[b];if(g)c.apply(this,d);else for(g=c.length,c=e(c,g),f=0;f<g;++f)c[f].apply(this,d)}return!0};d.prototype.addListener=function(a,c){return f(this,a,c,!1)};d.prototype.on=d.prototype.addListener;d.prototype.prependListener=function(a,c){return f(this,a,c,!0)};d.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');
this.on(a,c(this,a,b));return this};d.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.prependListener(a,c(this,a,b));return this};d.prototype.removeListener=function(a,c){var b;if("function"!==typeof c)throw new TypeError('"listener" argument must be a function');var g=this._events;if(!g)return this;var e=g[a];if(!e)return this;if(e===c||e.listener===c)0===--this._eventsCount?this._events=p(null):(delete g[a],
g.removeListener&&this.emit("removeListener",a,e.listener||c));else if("function"!==typeof e){var d=-1;for(b=e.length-1;0<=b;b--)if(e[b]===c||e[b].listener===c){var f=e[b].listener;d=b;break}if(0>d)return this;if(0===d)e.shift();else{b=d+1;for(var k=e.length;b<k;d+=1,b+=1)e[d]=e[b];e.pop()}1===e.length&&(g[a]=e[0]);g.removeListener&&this.emit("removeListener",a,f||c)}return this};d.prototype.removeAllListeners=function(a){var c=this._events;if(!c)return this;if(!c.removeListener)return 0===arguments.length?
(this._events=p(null),this._eventsCount=0):c[a]&&(0===--this._eventsCount?this._events=p(null):delete c[a]),this;if(0===arguments.length){var b=t(c);for(c=0;c<b.length;++c){var g=b[c];"removeListener"!==g&&this.removeAllListeners(g)}this.removeAllListeners("removeListener");this._events=p(null);this._eventsCount=0;return this}b=c[a];if("function"===typeof b)this.removeListener(a,b);else if(b)for(c=b.length-1;0<=c;c--)this.removeListener(a,b[c]);return this};d.prototype.listeners=function(a){return g(this,
a,!0)};d.prototype.rawListeners=function(a){return g(this,a,!1)};d.listenerCount=function(a,c){return"function"===typeof a.listenerCount?a.listenerCount(c):k.call(a,c)};d.prototype.listenerCount=k;d.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],6:[function(a,b,h){function d(a,b){var c=[],g=[];null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+g.slice(0,c.indexOf(b)).join(".")+"]"});return function(d,e){if(0<c.length){var f=c.indexOf(this);
~f?c.splice(f+1):c.push(this);~f?g.splice(f,Infinity,d):g.push(d);~c.indexOf(e)&&(e=b.call(this,d,e))}else c.push(e);return null==a?e:a.call(this,d,e)}}h=b.exports=function(a,b,c,g){return JSON.stringify(a,d(b,g),c)};h.getSerialize=d},{}],7:[function(a,b,h){function d(){throw Error("setTimeout has not been defined");}function f(){throw Error("clearTimeout has not been defined");}function l(a){if(r===setTimeout)return setTimeout(a,0);if((r===d||!r)&&setTimeout)return r=setTimeout,setTimeout(a,0);try{return r(a,
0)}catch(x){try{return r.call(null,a,0)}catch(y){return r.call(this,a,0)}}}function c(a){if(n===clearTimeout)return clearTimeout(a);if((n===f||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(a);try{return n(a)}catch(x){try{return n.call(null,a)}catch(y){return n.call(this,a)}}}function g(){t&&q&&(t=!1,q.length?p=q.concat(p):u=-1,p.length&&k())}function k(){if(!t){var a=l(g);t=!0;for(var b=p.length;b;){q=p;for(p=[];++u<b;)q&&q[u].run();u=-1;b=p.length}q=null;t=!1;c(a)}}function e(a,c){this.fun=
a;this.array=c}function m(){}a=b.exports={};try{var r="function"===typeof setTimeout?setTimeout:d}catch(v){r=d}try{var n="function"===typeof clearTimeout?clearTimeout:f}catch(v){n=f}var p=[],t=!1,q,u=-1;a.nextTick=function(a){var c=Array(arguments.length-1);if(1<arguments.length)for(var b=1;b<arguments.length;b++)c[b-1]=arguments[b];p.push(new e(a,c));1!==p.length||t||l(k)};e.prototype.run=function(){this.fun.apply(null,this.array)};a.title="browser";a.browser=!0;a.env={};a.argv=[];a.version="";a.versions=
{};a.on=m;a.addListener=m;a.once=m;a.off=m;a.removeListener=m;a.removeAllListeners=m;a.emit=m;a.prependListener=m;a.prependOnceListener=m;a.listeners=function(a){return[]};a.binding=function(a){throw Error("process.binding is not supported");};a.cwd=function(){return"/"};a.chdir=function(a){throw Error("process.chdir is not supported");};a.umask=function(){return 0}},{}],8:[function(a,b,h){(function(d){var f=a("./util").arrayOrPush,l=a("./lib/caller"),c=a("./lib/emitter"),g=a("./reporters"),k=a("./lib/testrunner"),
e=a("./lib/expect"),m=a("./util/symbols"),h=function(){function a(c){var b,g;_classCallCheck(this,a);this.name=c;this.__suite__={tests:[],beforeHooks:(b={},_defineProperty2(b,m.Start,[]),_defineProperty2(b,m.End,[]),_defineProperty2(b,"*",[]),b),afterHooks:(g={},_defineProperty2(g,m.Start,[]),_defineProperty2(g,m.End,[]),_defineProperty2(g,"*",[]),g)}}_createClass(a,[{key:"test",value:function(a,c){if(this.__suite__.tests.find(function(c){return c.description===a}))throw Error("Test '"+a+"' already exists!");
this.__suite__.tests.push({description:a,type:"test",run:function(a){return l(c,a)}});return this}},{key:"before",value:function(a,c,b){f(this.__suite__.beforeHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"after",value:function(a,c,b){f(this.__suite__.afterHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"run",value:function(){var a=this,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!0===
b.reporter)g.default(c,b);else if("function"===typeof b.reporter)b.reporter(c,b);else if(g[b.reporter])g[b.reporter](c,b);c.emit("start");return k(this,b).then(function(e){var f;e.count=e.length;e.success=e.filter(function(a){return"ok"===a.status});e.failures=e.filter(function(a){return"notOk"===a.status});e.skipped=e.filter(function(a){return"skip"===a.status});e.successPercent=Math.floor(e.success.length/e.length*100);e.name=a.name;100!==e.successPercent&&"undefined"!==typeof d&&(d.exitCode=1);
c.emit("test end",e);c.emit("end",e);return b.request?(f={},_defineProperty2(f,b.request,g[b.request].convert(e)),_defineProperty2(f,"json",e),f):e})}}]);return a}();b.exports=h;b.exports.expect=e;b.exports.expectMany=e.expectMany;b.exports.Start=m.Start;b.exports.End=m.End;b.exports.Gunner=b.exports}).call(this,a("_process"))},{"./lib/caller":12,"./lib/emitter":13,"./lib/expect":14,"./lib/testrunner":15,"./reporters":17,"./util":20,"./util/symbols":21,_process:7}],9:[function(a,b,h){var d=a("../util").isPromise,
f=function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),d=1;d<c;d++)b[d-1]=arguments[d];return Promise.reject(a?a.apply(void 0,b):"")};b.exports=function(a,c){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},k=_toArray(c),e=k[0],m=k.slice(1);e=b.skipStatement?function(){return b.skipStatement}:e;return d(a)?a.catch(function(){return f.apply(void 0,[e].concat(_toConsumableArray2(m)))}):a?Promise.resolve():f.apply(void 0,[e].concat(_toConsumableArray2(m)))}},{"../util":20}],10:[function(a,
b,h){var d=a("@codefeathers/iseq"),f=a("../util"),l=f.taggedStringify;b.exports.done=[function(){return!0},function(){return null}];b.exports.fail=[function(){return!1},function(a,b){return b}];b.exports.exists=[function(a){return"undefined"!==typeof a},function(){return"Value is undefined"}];b.exports.isArray=[function(a){return Array.isArray(a)},function(a){return l(_templateObject,a)}];b.exports.isObject=[function(a){return"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&null!==a},
function(a){return l(_templateObject2,a)}];b.exports.hasLength=[function(a,b){return a.length===b},function(a,b){return l(_templateObject3,a,b)}];b.exports.equals=[function(a,b){return a===b},function(a,b){return l(_templateObject4,a,b)}];b.exports.deepEquals=[function(a,b){return d(a,b)},function(a,b){return l(_templateObject5,a,b)}];b.exports.contains=[function(a,b){return d(a,b,Object.keys(b))},function(a,b){return l(_templateObject6,a,b)}];b.exports.isTrue=[function(a){return!0===a},function(a){return l(_templateObject7,
a)}];b.exports.isFalse=[function(a){return!1===a},function(a){return l(_templateObject8,a)}];b.exports.hasProp=[function(a,b){return a.hasOwnProperty(b)},function(a,b){return l(_templateObject9,a,b)}];b.exports.hasPair=[function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),e=1;e<c;e++)b[e-1]=arguments[e];return d(a[b[0]],b[1])},function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),e=1;e<c;e++)b[e-1]=arguments[e];return l(_templateObject10,b,a)}];b.exports.isPromise=[function(a){return f.isPromise(a)},
function(a){return l(_templateObject11,a)},{shouldCatch:!0}];b.exports.resolvesTo=[function(a,b){return f.isPromise(a)?a.then(function(a){return a===b?Promise.resolve():Promise.reject()}):Promise.reject(a+" was not a Promise")},function(a,b){return l(_templateObject12,a,b)}];b.exports.isType=[function(a,b){return"nil"===b&&("null"===a||"undefined"===a)||("undefined"===typeof a?"undefined":_typeof2(a))===b||Array.isArray(a)&&"array"===b&&null===a&&"object"!==b},function(a,b){return l(_templateObject13,
Symbol&&a!==Symbol.prototype?"symbol":"undefined"===typeof a?"undefined":_typeof2(a)};(function(a){"object"===("undefined"===typeof h?"undefined":g(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:this).promiseObject=a()})(function(){return function(){function c(b,g,d){function f(k,m){if(!g[k]){if(!b[k]){var l="function"==typeof a&&a;if(!m&&l)return l(k,!0);if(e)return e(k,!0);m=Error("Cannot find module '"+k+"'");
throw m.code="MODULE_NOT_FOUND",m;}m=g[k]={exports:{}};b[k][0].call(m.exports,function(a){return f(b[k][1][a]||a)},m,m.exports,c,b,g,d)}return g[k].exports}for(var e="function"==typeof a&&a,k=0;k<d.length;k++)f(d[k]);return f}return c}()({1:[function(a,c,b){c.exports=a("../index.js")},{"../index.js":2}],2:[function(a,b,e){var f=function(a){return a&&"object"===("undefined"===typeof a?"undefined":g(a))&&a.constructor===Object},k="undefined"!==typeof Symbol?Symbol("SELF"):"[~~//-- SELF --//~~]",m=function(a,
c){return function w(b){return Object.keys(b).reduce(function(g,d){var e=b[d];return e===c?(b[d]=a,[].concat(l(g),[d])):f(e)?[].concat(l(g),l(w(e,c))):g},[])}(a)},h=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},q=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};b.exports=function(a){var b=!1;return function w(g){return Promise.resolve(g).then(function(g){return Array.isArray(g)?
h(g,function(a){return w(a)}):f(g)?q(Object.keys(g).reduce(function(f,e){return g[e]===a?(b=!0,c({},f,d({},e,k))):c({},f,d({},e,w(g[e])))},{})):g})}(a).then(function(a){b&&m(a,k);return a})}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../index.js":4}],4:[function(a,b,h){var e=function(a){return a&&"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&a.constructor===Object},d="undefined"!==typeof Symbol?
Symbol("SELF"):"[~~//-- SELF --//~~]",l=function(a,c){return function n(b){return Object.keys(b).reduce(function(f,g){var d=b[g];return d===c?(b[g]=a,[].concat(_toConsumableArray2(f),[g])):e(d)?[].concat(_toConsumableArray2(f),_toConsumableArray2(n(d,c))):f},[])}(a)},c=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},g=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};
b.exports=function(a){var b=!1;return function n(f){return Promise.resolve(f).then(function(f){return Array.isArray(f)?c(f,function(a){return n(a)}):e(f)?g(Object.keys(f).reduce(function(c,g){return f[g]===a?(b=!0,_extends2({},c,_defineProperty2({},g,d))):_extends2({},c,_defineProperty2({},g,n(f[g])))},{})):f})}(a).then(function(a){b&&l(a,d);return a})}},{}],5:[function(a,b,h){},{}],6:[function(a,b,h){function e(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=p(null),
this._eventsCount=0);this._maxListeners=this._maxListeners||void 0}function d(a,c,b,f){var g;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');if(g=a._events){g.newListener&&(a.emit("newListener",c,b.listener?b.listener:b),g=a._events);var d=g[c]}else g=a._events=p(null),a._eventsCount=0;d?("function"===typeof d?d=g[c]=f?[b,d]:[d,b]:f?d.unshift(b):d.push(b),d.warned||(b=void 0===a._maxListeners?e.defaultMaxListeners:a._maxListeners)&&0<b&&d.length>b&&(d.warned=
!0,b=Error("Possible EventEmitter memory leak detected. "+d.length+' "'+String(c)+'" listeners added. Use emitter.setMaxListeners() to increase limit.'),b.name="MaxListenersExceededWarning",b.emitter=a,b.type=c,b.count=d.length,"object"===("undefined"===typeof console?"undefined":_typeof2(console))&&console.warn&&console.warn("%s: %s",b.name,b.message))):(g[c]=b,++a._eventsCount);return a}function l(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);
case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var a=Array(arguments.length),c=0;c<a.length;++c)a[c]=arguments[c];this.listener.apply(this.target,a)}}function c(a,c,b){a={fired:!1,wrapFn:void 0,target:a,type:c,listener:b};c=q.call(l,a);c.listener=b;return a.wrapFn=c}function g(a,c,b){a=a._events;if(!a)return[];c=a[c];if(!c)return[];
if("function"===typeof c)return b?[c.listener||c]:[c];if(b)for(b=Array(c.length),a=0;a<b.length;++a)b[a]=c[a].listener||c[a];else b=f(c,c.length);return b}function k(a){var c=this._events;if(c){a=c[a];if("function"===typeof a)return 1;if(a)return a.length}return 0}function f(a,c){for(var b=Array(c),g=0;g<c;++g)b[g]=a[g];return b}function m(a){var c=function(){};c.prototype=a;return new c}function r(a){var c=[],b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return b}function n(a){var c=
this;return function(){return c.apply(a,arguments)}}var p=Object.create||m,t=Object.keys||r,q=Function.prototype.bind||n;b.exports=e;e.EventEmitter=e;e.prototype._events=void 0;e.prototype._maxListeners=void 0;var u=10;try{a={};Object.defineProperty&&Object.defineProperty(a,"x",{value:0});var v=0===a.x}catch(x){v=!1}v?Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(a){if("number"!==typeof a||0>a||a!==a)throw new TypeError('"defaultMaxListeners" must be a positive number');
u=a}}):e.defaultMaxListeners=u;e.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=a;return this};e.prototype.getMaxListeners=function(){return void 0===this._maxListeners?e.defaultMaxListeners:this._maxListeners};e.prototype.emit=function(a){var c,b,g;var d="error"===a;if(g=this._events)d=d&&null==g.error;else if(!d)return!1;if(d){1<arguments.length&&(c=arguments[1]);if(c instanceof Error)throw c;
g=Error('Unhandled "error" event. ('+c+")");g.context=c;throw g;}c=g[a];if(!c)return!1;g="function"===typeof c;var e=arguments.length;switch(e){case 1:if(g)c.call(this);else for(g=c.length,c=f(c,g),d=0;d<g;++d)c[d].call(this);break;case 2:d=arguments[1];if(g)c.call(this,d);else for(g=c.length,c=f(c,g),e=0;e<g;++e)c[e].call(this,d);break;case 3:d=arguments[1];e=arguments[2];if(g)c.call(this,d,e);else for(g=c.length,c=f(c,g),b=0;b<g;++b)c[b].call(this,d,e);break;case 4:d=arguments[1];e=arguments[2];
b=arguments[3];if(g)c.call(this,d,e,b);else{g=c.length;c=f(c,g);for(var k=0;k<g;++k)c[k].call(this,d,e,b)}break;default:d=Array(e-1);for(b=1;b<e;b++)d[b-1]=arguments[b];if(g)c.apply(this,d);else for(g=c.length,c=f(c,g),e=0;e<g;++e)c[e].apply(this,d)}return!0};e.prototype.addListener=function(a,c){return d(this,a,c,!1)};e.prototype.on=e.prototype.addListener;e.prototype.prependListener=function(a,c){return d(this,a,c,!0)};e.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');
this.on(a,c(this,a,b));return this};e.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.prependListener(a,c(this,a,b));return this};e.prototype.removeListener=function(a,c){var b;if("function"!==typeof c)throw new TypeError('"listener" argument must be a function');var g=this._events;if(!g)return this;var f=g[a];if(!f)return this;if(f===c||f.listener===c)0===--this._eventsCount?this._events=p(null):(delete g[a],
g.removeListener&&this.emit("removeListener",a,f.listener||c));else if("function"!==typeof f){var d=-1;for(b=f.length-1;0<=b;b--)if(f[b]===c||f[b].listener===c){var e=f[b].listener;d=b;break}if(0>d)return this;if(0===d)f.shift();else{b=d+1;for(var k=f.length;b<k;d+=1,b+=1)f[d]=f[b];f.pop()}1===f.length&&(g[a]=f[0]);g.removeListener&&this.emit("removeListener",a,e||c)}return this};e.prototype.removeAllListeners=function(a){var c=this._events;if(!c)return this;if(!c.removeListener)return 0===arguments.length?
(this._events=p(null),this._eventsCount=0):c[a]&&(0===--this._eventsCount?this._events=p(null):delete c[a]),this;if(0===arguments.length){var b=t(c);for(c=0;c<b.length;++c){var g=b[c];"removeListener"!==g&&this.removeAllListeners(g)}this.removeAllListeners("removeListener");this._events=p(null);this._eventsCount=0;return this}b=c[a];if("function"===typeof b)this.removeListener(a,b);else if(b)for(c=b.length-1;0<=c;c--)this.removeListener(a,b[c]);return this};e.prototype.listeners=function(a){return g(this,
a,!0)};e.prototype.rawListeners=function(a){return g(this,a,!1)};e.listenerCount=function(a,c){return"function"===typeof a.listenerCount?a.listenerCount(c):k.call(a,c)};e.prototype.listenerCount=k;e.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],7:[function(a,b,h){function e(a,b){var c=[],g=[];null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+g.slice(0,c.indexOf(b)).join(".")+"]"});return function(d,f){if(0<c.length){var e=c.indexOf(this);
~e?c.splice(e+1):c.push(this);~e?g.splice(e,Infinity,d):g.push(d);~c.indexOf(f)&&(f=b.call(this,d,f))}else c.push(f);return null==a?f:a.call(this,d,f)}}h=b.exports=function(a,b,c,g){return JSON.stringify(a,e(b,g),c)};h.getSerialize=e},{}],8:[function(a,b,h){function e(){throw Error("setTimeout has not been defined");}function d(){throw Error("clearTimeout has not been defined");}function l(a){if(r===setTimeout)return setTimeout(a,0);if((r===e||!r)&&setTimeout)return r=setTimeout,setTimeout(a,0);try{return r(a,
0)}catch(x){try{return r.call(null,a,0)}catch(y){return r.call(this,a,0)}}}function c(a){if(n===clearTimeout)return clearTimeout(a);if((n===d||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(a);try{return n(a)}catch(x){try{return n.call(null,a)}catch(y){return n.call(this,a)}}}function g(){t&&q&&(t=!1,q.length?p=q.concat(p):u=-1,p.length&&k())}function k(){if(!t){var a=l(g);t=!0;for(var b=p.length;b;){q=p;for(p=[];++u<b;)q&&q[u].run();u=-1;b=p.length}q=null;t=!1;c(a)}}function f(a,c){this.fun=
a;this.array=c}function m(){}a=b.exports={};try{var r="function"===typeof setTimeout?setTimeout:e}catch(v){r=e}try{var n="function"===typeof clearTimeout?clearTimeout:d}catch(v){n=d}var p=[],t=!1,q,u=-1;a.nextTick=function(a){var c=Array(arguments.length-1);if(1<arguments.length)for(var b=1;b<arguments.length;b++)c[b-1]=arguments[b];p.push(new f(a,c));1!==p.length||t||l(k)};f.prototype.run=function(){this.fun.apply(null,this.array)};a.title="browser";a.browser=!0;a.env={};a.argv=[];a.version="";a.versions=
{};a.on=m;a.addListener=m;a.once=m;a.off=m;a.removeListener=m;a.removeAllListeners=m;a.emit=m;a.prependListener=m;a.prependOnceListener=m;a.listeners=function(a){return[]};a.binding=function(a){throw Error("process.binding is not supported");};a.cwd=function(){return"/"};a.chdir=function(a){throw Error("process.chdir is not supported");};a.umask=function(){return 0}},{}],9:[function(a,b,h){(function(e){var d=a("./util").arrayOrPush,l=a("./lib/caller"),c=a("./lib/emitter"),g=a("./reporters"),k=a("./lib/testrunner"),
f=a("./lib/expect"),m=a("./util/symbols"),h=function(){function a(c){var b,g;_classCallCheck(this,a);this.name=c;this.__suite__={tests:[],beforeHooks:(b={},_defineProperty2(b,m.Start,[]),_defineProperty2(b,m.End,[]),_defineProperty2(b,"*",[]),b),afterHooks:(g={},_defineProperty2(g,m.Start,[]),_defineProperty2(g,m.End,[]),_defineProperty2(g,"*",[]),g)}}_createClass(a,[{key:"test",value:function(a,c){if(this.__suite__.tests.find(function(c){return c.description===a}))throw Error("Test '"+a+"' already exists!");
this.__suite__.tests.push({description:a,type:"test",run:function(a){return l(c,a)}});return this}},{key:"before",value:function(a,c,b){d(this.__suite__.beforeHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"after",value:function(a,c,b){d(this.__suite__.afterHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"run",value:function(){var a=this,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!0===
b.reporter)g.default(c,b);else if("function"===typeof b.reporter)b.reporter(c,b);else if(g[b.reporter])g[b.reporter](c,b);c.emit("start");return k(this,b).then(function(f){var d;f.count=f.length;f.success=f.filter(function(a){return"ok"===a.status});f.failures=f.filter(function(a){return"notOk"===a.status});f.skipped=f.filter(function(a){return"skip"===a.status});f.successPercent=Math.floor(f.success.length/f.length*100);f.name=a.name;100!==f.successPercent&&"undefined"!==typeof e&&(e.exitCode=1);
c.emit("test end",f);c.emit("end",f);return b.request?(d={},_defineProperty2(d,b.request,g[b.request].convert(f)),_defineProperty2(d,"json",f),d):f})}}]);return a}();b.exports=h;b.exports.expect=f;b.exports.expectMany=f.expectMany;b.exports.Start=m.Start;b.exports.End=m.End;b.exports.Gunner=b.exports}).call(this,a("_process"))},{"./lib/caller":13,"./lib/emitter":14,"./lib/expect":15,"./lib/testrunner":16,"./reporters":18,"./util":21,"./util/symbols":22,_process:8}],10:[function(a,b,h){var e=a("../util").isPromise,
d=function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),d=1;d<c;d++)b[d-1]=arguments[d];return Promise.reject(a?a.apply(void 0,b):"")};b.exports=function(a,c){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},k=_toArray(c),f=k[0],m=k.slice(1);f=b.skipStatement?function(){return b.skipStatement}:f;return e(a)?a.catch(function(){return d.apply(void 0,[f].concat(_toConsumableArray2(m)))}):a?Promise.resolve():d.apply(void 0,[f].concat(_toConsumableArray2(m)))}},{"../util":21}],11:[function(a,
b,h){var e=a("@codefeathers/iseq"),d=a("../util"),l=d.taggedStringify;b.exports.done=[function(){return!0},function(){return null}];b.exports.fail=[function(){return!1},function(a,b){return b}];b.exports.exists=[function(a){return"undefined"!==typeof a},function(){return"Value is undefined"}];b.exports.isArray=[function(a){return Array.isArray(a)},function(a){return l(_templateObject,a)}];b.exports.isObject=[function(a){return"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&null!==a},
function(a){return l(_templateObject2,a)}];b.exports.hasLength=[function(a,b){return a.length===b},function(a,b){return l(_templateObject3,a,b)}];b.exports.equals=[function(a,b){return a===b},function(a,b){return l(_templateObject4,a,b)}];b.exports.deepEquals=[function(a,b){return e(a,b)},function(a,b){return l(_templateObject5,a,b)}];b.exports.contains=[function(a,b){return e(a,b,Object.keys(b))},function(a,b){return l(_templateObject6,a,b)}];b.exports.isTrue=[function(a){return!0===a},function(a){return l(_templateObject7,
a)}];b.exports.isFalse=[function(a){return!1===a},function(a){return l(_templateObject8,a)}];b.exports.hasProp=[function(a,b){return a.hasOwnProperty(b)},function(a,b){return l(_templateObject9,a,b)}];b.exports.hasPair=[function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),f=1;f<b;f++)c[f-1]=arguments[f];return e(a[c[0]],c[1])},function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),f=1;f<b;f++)c[f-1]=arguments[f];return l(_templateObject10,c,a)}];b.exports.isPromise=[function(a){return d.isPromise(a)},
function(a){return l(_templateObject11,a)},{shouldCatch:!0}];b.exports.resolvesTo=[function(a,b){return d.isPromise(a)?a.then(function(a){return a===b?Promise.resolve():Promise.reject()}):Promise.reject(a+" was not a Promise")},function(a,b){return l(_templateObject12,a,b)}];b.exports.isType=[function(a,b){return"nil"===b&&("null"===a||"undefined"===a)||("undefined"===typeof a?"undefined":_typeof2(a))===b||Array.isArray(a)&&"array"===b&&null===a&&"object"!==b},function(a,b){return l(_templateObject13,
a,b)}];b.exports.greaterThan=[function(a,b){return a>b},function(a,b){return l(_templateObject14,a,b)}];b.exports.lessThan=[function(a,b){return a<b},function(a,b){return l(_templateObject15,a,b)}];b.exports.gte=[function(a,b){return a>=b},function(a,b){return l(_templateObject16,a,b)}];b.exports.lte=[function(a,b){return a<=b},function(a,b){return l(_templateObject17,a,b)}];b.exports.success=b.exports.done;b.exports.succeed=b.exports.done;b.exports.failure=b.exports.fail;b.exports.equal=b.exports.equals;
b.exports.deepEqual=b.exports.deepEquals;b.exports.match=b.exports.deepEquals;b.exports.greaterThanOrEqualTo=b.exports.gte;b.exports.lessThanOrEqualTo=b.exports.lte},{"../util":20,"@codefeathers/iseq":2}],11:[function(a,b,h){a("../gunner");var d=a("../util/symbols"),f=function(a){return function(b){return{type:a,unit:b}}};b.exports=function(a){var b=[];Array.prototype.push.apply(b,a.__suite__.beforeHooks[d.Start].map(f("@start")));b.push.apply(a.__suite__.afterHooks[d.Start].map(f("@start")));a.__suite__.tests.forEach(function(c){return Array.prototype.push.apply(b,
a.__suite__.beforeHooks["*"].map(f("@every"))),Array.prototype.push.apply(b,(a.__suite__.beforeHooks[c.description]||[]).map(f("@this"))),b.push(f("@test")(c)),Array.prototype.push.apply(b,(a.__suite__.afterHooks[c.description]||[]).map(f("@afterTest"))),Array.prototype.push.apply(b,a.__suite__.afterHooks["*"].map(f("@afterEvery")))});Array.prototype.push.apply(b,a.__suite__.beforeHooks[d.End].map(f("@beforeend")));Array.prototype.push.apply(b,a.__suite__.afterHooks[d.End].map(f("@end")));return b}},
{"../gunner":8,"../util/symbols":21}],12:[function(a,b,h){var d=a("../util").isPromise;b.exports=function(a,b){var c=void 0,f=void 0,k=void 0;try{c=a(b)}catch(e){k=!0,f=e}return d(c)?c.then(function(a){return{status:"ok",resolve:a,promise:!0}}).catch(function(a){return{status:"notOk",rejection:a,promise:!0}}):Promise.resolve(_extends2({status:k?"notOk":"ok"},!k&&{value:c},k&&{error:f},{promise:!1}))}},{"../util":20}],13:[function(a,b,h){a=function(a){function b(){_classCallCheck(this,b);return _possibleConstructorReturn(this,
(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}_inherits(b,a);return b}(a("events"));b.exports=new a},{events:5}],14:[function(a,b,h){h=a("../util");var d=h.liftPromise,f=h.lowerCaseFirstLetter,l=a("./assertionsLibrary"),c=a("./assertPromise"),g=function(a,b){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return function(f){return function(){for(var g=arguments.length,m=Array(g),k=0;k<g;k++)m[k]=arguments[k];return d(function(e){return c(a.apply(void 0,[f].concat(m)),
[b,e].concat(m))},f).catch(function(d){return e.shouldCatch?c(a.apply(void 0,[f].concat(m)),[b,d].concat(m),{skipStatement:d}):Promise.reject(d)})}}},k=Object.keys(l).reduce(function(a,b){var c=_slicedToArray(l[b],3);a[b]=g(c[0],c[1],c[2]);return a},{});b.exports=function(a,b){return new Proxy({},{get:function(c,e){var d=b?a.apply(void 0,_toConsumableArray2(b)):a;if(k.hasOwnProperty(e))return function(){return k[e](d).apply(void 0,arguments)};if("not"===e.slice(0,3))return function(){return k[f(e.slice(3))](d).apply(void 0,
arguments).then(Promise.reject,Promise.resolve)};throw Error("Unknown assertion method",e);}})};b.exports.expectMany=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return Promise.all(b)}},{"../util":20,"./assertPromise":9,"./assertionsLibrary":10}],15:[function(a,b,h){a("../gunner");Promise.object=a("@codefeathers/promise.object");h=a("../util");var d=h.last,f=h.pipe,l=h.pick,c=h.assignToObject,g=a("./buildTestQueue"),k=function(a,b){var c=a.findIndex(function(a){return"@start"===
a.type}),e=a.findIndex(function(a){return"@every"===a.type}),d=a.findIndex(function(a){return a.description===b.description});return-1!==c&&"A start hook failed\n"+a[c].error||-1!==e&&"An every hook failed\n"+a[e].error||-1!==d&&"A before test hook failed\n"+a[d].error},e=function(a){return a.reduce(function(b,e){return Promise.resolve(b).then(function(b){return Promise.all([d(b.results),Promise.object(b.state)]).then(function(a){a=_slicedToArray(a,2)[1];return[k(b.skip,e.unit),a]}).then(function(a){var b=
_slicedToArray(a,2);a=b[0];b=b[1];return a?{status:"skip",description:a}:e.unit.run(b)}).then(function(d){var f=d.status;if("@test"===e.type){var g=_extends2({status:f,description:e.unit.description},("notOk"===f||"skip"===f)&&{reason:d.error||d.rejection||d.description});b.results.push(g)}else{g=e.unit.label||a.filter(function(a){return a.type===e.type}).filter(function(a){return a.unit.description===e.unit.description}).length;var k="ok"===f?d.promise?d.resolve:d.value:null;g&&k&&c(b.state,e.type)(g,
k)}"notOk"===f&&b.skip.push({type:e.type,description:e.unit.description,error:d.promise?d.rejection:d.error});return b})})},{results:[],state:{},skip:[]})};b.exports=function(a){return Promise.object(f(g,e,l("results"))(a))}},{"../gunner":8,"../util":20,"./buildTestQueue":11,"@codefeathers/promise.object":3}],16:[function(a,b,h){var d={ok:["ok","\u2705"],notOk:["notOk","\u274c"],skip:["skip","\u26a0\ufe0f"]};b.exports=function(a,b){a.on("start",function(){return console.log("Started tests")});a.on("test end",
function(a){a.forEach(function(a){var c=d[a.status];console.log(">",c[0],c[1],a.description);b.trace&&a.reason&&console.log("\n---\n\n",a.reason,"\n\n---\n")})});a.on("end",function(a){console.log(a.success.length,"tests of",a.length,"passed");console.log("Success ratio:",a.successPercent,"%")})};b.exports.convert=function(a){return a}},{}],17:[function(a,b,h){b.exports={default:a("./default"),tap:a("./tap"),xunit:a("./xunit")}},{"./default":16,"./tap":18,"./xunit":19}],18:[function(a,b,h){var d=
{ok:"ok",notOk:"not ok",skip:"skip"},f=function(a,b){return"\nTAP version 13\n"+(a.length?"1":0)+".."+a.length+"\n"+a.map(function(a,c){var e=b.trace&&a.reason&&(a.reason.stack?a.reason.stack:a.reason)||"";return d[a.status]+" "+(c+1)+" - "+a.description+(e&&"\n ---\n message: |\n "+e+"\n ---\n")}).join("\n")+"\n"};b.exports=function(a,b){a.on("end",function(a){return console.log(f(a,b))})};b.exports.convert=f},{}],19:[function(a,b,h){var d=function(a,b,d,f){d=d?"/>":">";var c=[],g=void 0;Object.keys(b).forEach(function(a){Object.prototype.hasOwnProperty.call(b,
a)&&c.push(a+'="'+b[a]+'"')});g="<"+a+(c.length?" "+c.join(" "):"")+d;f&&(g+=f+"</"+a+d);return new String(g)},f=function(a){return'<?xml version="1.0"?>'+d("testsuites",{},!1,d("testsuite",{tests:a.count,success:a.success.length,failures:a.failures.length,skipped:a.skipped.length},!1,a.reduce(function(a,b){var c="ok"===b.status,e="ok"!==b.status&&("skip"===b.status?d("skipped",{},!0):d("failure",{},!b.reason,b.reason?escape(b.reason):""));return a+=d("testcase",{name:escape(b.description)},c,e||
"")},"")))};b.exports=function(a){a.on("end",function(a){console.log(f(a))})};b.exports.convert=f},{}],20:[function(a,b,h){var d=a("json-stringify-safe"),f=function(a){return a&&"object"===("undefined"===typeof a?"undefined":_typeof2(a))},l=function(a){return f(a)?a.stack||d(a):a},c=function(a){return a&&"function"===typeof a.then},g=function(a,b){return c(b)?b.then(a):a(b)};b.exports={isObject:f,isPromise:c,liftPromise:g,path:function(a){return function(b){return b.reduce(function(a,b){return a&&
a[b]},a)}},pick:function(a){return function(b){return b[a]}},pipe:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a){return b.reduce(function(a,b){return g(b,a)},a)}},reduce:function(a,b){return function(c){return c.reduce(a,b)}},flatten:function(a){return[].concat.apply([],a)},deepFlatten:function m(a){var b;return(b=[]).concat.apply(b,_toConsumableArray2(a.map(function(a){return Array.isArray(a)?m(a):a})))},map:function(a){return function(b){return b.map(a)}},
filter:function(a){return function(b){return b.filter(a)}},identity:function(a){return a},wrapWith:function(a){return function(b){return _defineProperty2({},a,b)}},unwrapFrom:function(a){return function(b){return b[a]}},promiseAll:function(a){return Promise.all(a)},partial:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return function(){for(var b=arguments.length,d=Array(b),e=0;e<b;e++)d[e]=arguments[e];return a.apply(void 0,c.concat(d))}},isIn:function(a,
b){return-1!==a.indexOf(b)},containsPath:function(a,b){return a.some(function(a){return b.match(new RegExp("/"+a+"/?$"))})},stringify:l,taggedStringify:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return a.reduce(function(a,b,d){return a+b+(l(c[d])||"")},"")},short:function(a,b){return function(c){return function(d){return a(d)?b(d):c(d)}}},hasProp:function(a){return function(b){return b in a}},last:function(a){return a[a.length-1]},upperCaseFirstLetter:function(a){return a[0].toUpperCase()+
a.slice(1)},lowerCaseFirstLetter:function(a){return a[0].toLowerCase()+a.slice(1)},arrayOrPush:function(a,b,c){return Array.isArray(a[b])?a[b].push(c):a[b]=[c]},assignToObject:function(a,b){return function(c,d){return f(a[b])?a[b][c]=d:a[b]=_defineProperty2({},c,d)}}}},{"json-stringify-safe":6}],21:[function(a,b,h){b.exports={Start:Symbol("Start"),End:Symbol("End"),expect:Symbol("expect"),pass:"pass",fail:"fail"}},{}]},{},[1])(1)});
b.exports.deepEqual=b.exports.deepEquals;b.exports.match=b.exports.deepEquals;b.exports.greaterThanOrEqualTo=b.exports.gte;b.exports.lessThanOrEqualTo=b.exports.lte},{"../util":21,"@codefeathers/iseq":2}],12:[function(a,b,h){a("../gunner");var e=a("../util/symbols"),d=function(a){return function(b){return{type:a,unit:b}}};b.exports=function(a){var b=[];Array.prototype.push.apply(b,a.__suite__.beforeHooks[e.Start].map(d("@start")));b.push.apply(a.__suite__.afterHooks[e.Start].map(d("@start")));a.__suite__.tests.forEach(function(c){return Array.prototype.push.apply(b,
a.__suite__.beforeHooks["*"].map(d("@every"))),Array.prototype.push.apply(b,(a.__suite__.beforeHooks[c.description]||[]).map(d("@this"))),b.push(d("@test")(c)),Array.prototype.push.apply(b,(a.__suite__.afterHooks[c.description]||[]).map(d("@afterTest"))),Array.prototype.push.apply(b,a.__suite__.afterHooks["*"].map(d("@afterEvery")))});Array.prototype.push.apply(b,a.__suite__.beforeHooks[e.End].map(d("@beforeend")));Array.prototype.push.apply(b,a.__suite__.afterHooks[e.End].map(d("@end")));return b}},
{"../gunner":9,"../util/symbols":22}],13:[function(a,b,h){var e=a("perf_hooks").performance,d=a("../util").isPromise;b.exports=function(a,b){var c=0,k=0,f=void 0,m=void 0,h=void 0;try{c=e.now(),f=a(b),k=e.now()}catch(n){k=e.now(),h=!0,m=n}return d(f)?f.then(function(a){return{duration:e.now()-c,status:"ok",resolve:a,promise:!0}}).catch(function(a){return{duration:e.now()-c,status:"notOk",rejection:a,promise:!0}}):Promise.resolve(_extends2({duration:k-c,status:h?"notOk":"ok"},!h&&{value:f},h&&{error:m},
{promise:!1}))}},{"../util":21,perf_hooks:5}],14:[function(a,b,h){a=function(a){function b(){_classCallCheck(this,b);return _possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}_inherits(b,a);return b}(a("events"));b.exports=new a},{events:6}],15:[function(a,b,h){h=a("../util");var e=h.liftPromise,d=h.lowerCaseFirstLetter,l=a("./assertionsLibrary"),c=a("./assertPromise"),g=function(a,b){var f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return function(d){return function(){for(var g=
arguments.length,m=Array(g),k=0;k<g;k++)m[k]=arguments[k];return e(function(f){return c(a.apply(void 0,[d].concat(m)),[b,f].concat(m))},d).catch(function(e){return f.shouldCatch?c(a.apply(void 0,[d].concat(m)),[b,e].concat(m),{skipStatement:e}):Promise.reject(e)})}}},k=Object.keys(l).reduce(function(a,b){var c=_slicedToArray(l[b],3);a[b]=g(c[0],c[1],c[2]);return a},{});b.exports=function(a,b){return new Proxy({},{get:function(c,f){var e=b?a.apply(void 0,_toConsumableArray2(b)):a;if(k.hasOwnProperty(f))return function(){return k[f](e).apply(void 0,
arguments)};if("not"===f.slice(0,3))return function(){return k[d(f.slice(3))](e).apply(void 0,arguments).then(Promise.reject,Promise.resolve)};throw Error("Unknown assertion method",f);}})};b.exports.expectMany=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return Promise.all(b)}},{"../util":21,"./assertPromise":10,"./assertionsLibrary":11}],16:[function(a,b,h){a("../gunner");Promise.object=a("@codefeathers/promise.object");var e=a("perf_hooks").performance;h=a("../util");
var d=h.last,l=h.pipe,c=h.pick,g=h.assignToObject,k=a("./buildTestQueue"),f=function(a,b){var c=a.findIndex(function(a){return"@start"===a.type}),f=a.findIndex(function(a){return"@every"===a.type}),d=a.findIndex(function(a){return a.description===b.description});return-1!==c&&"A start hook failed\n"+a[c].error||-1!==f&&"An every hook failed\n"+a[f].error||-1!==d&&"A before test hook failed\n"+a[d].error},m=function(a){return a.reduce(function(b,c){return Promise.resolve(b).then(function(b){return Promise.all([d(b.results),
Promise.object(b.state)]).then(function(a){a=_slicedToArray(a,2)[1];return[f(b.skip,c.unit),a]}).then(function(a){var b=_slicedToArray(a,2);a=b[0];b=b[1];return a?{status:"skip",description:a}:c.unit.run(b)}).then(function(f){var d=f.status,e=f.duration;if("@test"===c.type)e=_extends2({status:d,duration:e,description:c.unit.description},("notOk"===d||"skip"===d)&&{reason:f.error||f.rejection||f.description}),b.results.push(e);else{e=c.unit.label||a.filter(function(a){return a.type===c.type}).filter(function(a){return a.unit.description===
c.unit.description}).length;var k="ok"===d?f.promise?f.resolve:f.value:null;e&&k&&g(b.state,c.type)(e,k)}"notOk"===d&&b.skip.push({type:c.type,description:c.unit.description,error:f.promise?f.rejection:f.error});return b})})},{results:[],state:{},skip:[]})};b.exports=function(a){var b=e.now();return Promise.object(l(k,m,c("results"))(a)).then(function(a){a.duration=e.now()-b;return a})}},{"../gunner":9,"../util":21,"./buildTestQueue":12,"@codefeathers/promise.object":3,perf_hooks:5}],17:[function(a,
b,h){var e={ok:["ok","\u2705"],notOk:["notOk","\u274c"],skip:["skip","\u26a0\ufe0f"]};b.exports=function(a,b){a.on("start",function(){return console.log("Started tests")});a.on("test end",function(a){a.forEach(function(a){var c=e[a.status];console.log(">",c[0],c[1],a.description);b.trace&&a.reason&&console.log("\n---\n\n",a.reason,"\n\n---\n")})});a.on("end",function(a){console.log(a.success.length,"tests of",a.length,"passed");console.log("Success ratio:",a.successPercent,"%")})};b.exports.convert=
function(a){return a}},{}],18:[function(a,b,h){b.exports={default:a("./default"),tap:a("./tap"),xunit:a("./xunit")}},{"./default":17,"./tap":19,"./xunit":20}],19:[function(a,b,h){var e={ok:"ok",notOk:"not ok",skip:"skip"},d=function(a,b){return"\nTAP version 13\n"+(a.length?"1":0)+".."+a.length+"\n"+a.map(function(a,c){var f=b.trace&&a.reason&&(a.reason.stack?a.reason.stack:a.reason)||"";return e[a.status]+" "+(c+1)+" - "+a.description+(f&&"\n ---\n message: |\n "+f+"\n ---\n")}).join("\n")+
"\n"};b.exports=function(a,b){a.on("end",function(a){return console.log(d(a,b))})};b.exports.convert=d},{}],20:[function(a,b,h){var e=function(a,b,d,e){d=d?"/>":">";var c=[],g=void 0;Object.keys(b).forEach(function(a){Object.prototype.hasOwnProperty.call(b,a)&&c.push(a+'="'+b[a]+'"')});g="<"+a+(c.length?" "+c.join(" "):"")+d;e&&(g+=e+"</"+a+d);return new String(g)},d=function(a){return'<?xml version="1.0"?>'+e("testsuites",{},!1,e("testsuite",{name:a.name,tests:a.count,success:a.success.length,failures:a.failures.length,
skipped:a.skipped.length,timestamp:(new Date).toUTCString(),time:a.duration/1E3||0},!1,a.reduce(function(a,b){var c="ok"===b.status,f="ok"!==b.status&&("skip"===b.status?e("skipped",{},!0):e("failure",{},!b.reason,b.reason?b.reason:""));return a+=e("testcase",{name:b.description,time:b.duration/1E3||0},c,f||"")},"")))};b.exports=function(a){a.on("end",function(a){console.log(d(a))})};b.exports.convert=d},{}],21:[function(a,b,h){var e=a("json-stringify-safe"),d=function(a){return a&&"object"===("undefined"===
typeof a?"undefined":_typeof2(a))},l=function(a){return d(a)?a.stack||e(a):a},c=function(a){return a&&"function"===typeof a.then},g=function(a,b){return c(b)?b.then(a):a(b)};b.exports={isObject:d,isPromise:c,liftPromise:g,path:function(a){return function(b){return b.reduce(function(a,b){return a&&a[b]},a)}},pick:function(a){return function(b){return b[a]}},pipe:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a){return b.reduce(function(a,b){return g(b,
a)},a)}},reduce:function(a,b){return function(c){return c.reduce(a,b)}},flatten:function(a){return[].concat.apply([],a)},deepFlatten:function m(a){var b;return(b=[]).concat.apply(b,_toConsumableArray2(a.map(function(a){return Array.isArray(a)?m(a):a})))},map:function(a){return function(b){return b.map(a)}},filter:function(a){return function(b){return b.filter(a)}},identity:function(a){return a},wrapWith:function(a){return function(b){return _defineProperty2({},a,b)}},unwrapFrom:function(a){return function(b){return b[a]}},
promiseAll:function(a){return Promise.all(a)},partial:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return function(){for(var b=arguments.length,d=Array(b),f=0;f<b;f++)d[f]=arguments[f];return a.apply(void 0,c.concat(d))}},isIn:function(a,b){return-1!==a.indexOf(b)},containsPath:function(a,b){return a.some(function(a){return b.match(new RegExp("/"+a+"/?$"))})},stringify:l,taggedStringify:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-
1]=arguments[d];return a.reduce(function(a,b,d){return a+b+(l(c[d])||"")},"")},short:function(a,b){return function(c){return function(d){return a(d)?b(d):c(d)}}},hasProp:function(a){return function(b){return b in a}},last:function(a){return a[a.length-1]},upperCaseFirstLetter:function(a){return a[0].toUpperCase()+a.slice(1)},lowerCaseFirstLetter:function(a){return a[0].toLowerCase()+a.slice(1)},arrayOrPush:function(a,b,c){return Array.isArray(a[b])?a[b].push(c):a[b]=[c]},assignToObject:function(a,
b){return function(c,e){return d(a[b])?a[b][c]=e:a[b]=_defineProperty2({},c,e)}}}},{"json-stringify-safe":7}],22:[function(a,b,h){b.exports={Start:Symbol("Start"),End:Symbol("End"),expect:Symbol("expect"),pass:"pass",fail:"fail"}},{}]},{},[1])(1)});

108
es5/index.js

@ -17,7 +17,7 @@ var _templateObject = _taggedTemplateLiteral(["", " is not an array"], ["", " is
_templateObject7 = _taggedTemplateLiteral(["", " is not true"], ["", " is not true"]),
_templateObject8 = _taggedTemplateLiteral(["", " is not false"], ["", " is not false"]),
_templateObject9 = _taggedTemplateLiteral(["", " does not have property '", "'"], ["", " does not have property '", "'"]),
_templateObject10 = _taggedTemplateLiteral(["<", "> does not exist in ", ""], ["<", "> does not exist in ", ""]),
_templateObject10 = _taggedTemplateLiteral(["", " does not exist in ", ""], ["", " does not exist in ", ""]),
_templateObject11 = _taggedTemplateLiteral(["", " is not a promise"], ["", " is not a promise"]),
_templateObject12 = _taggedTemplateLiteral(["'", "' does not resolve to '", "'"], ["'", "' does not resolve to '", "'"]),
_templateObject13 = _taggedTemplateLiteral(["'", "' is not of type '", "'"], ["'", "' is not of type '", "'"]),
@ -73,7 +73,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
}return r;
}()({ 1: [function (require, module, exports) {
module.exports = require('../src/gunner');
}, { "../src/gunner": 8 }], 2: [function (require, module, exports) {
}, { "../src/gunner": 9 }], 2: [function (require, module, exports) {
(function (global) {
(function (f) {
if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === "object" && typeof module !== "undefined") {
@ -378,7 +378,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
};
module.exports = PromiseObject;
}, {}], 5: [function (require, module, exports) {
}, {}], 5: [function (require, module, exports) {}, {}], 6: [function (require, module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@ -860,7 +860,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
return fn.apply(context, arguments);
};
}
}, {}], 6: [function (require, module, exports) {
}, {}], 7: [function (require, module, exports) {
exports = module.exports = stringify;
exports.getSerialize = serializer;
@ -888,7 +888,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
return replacer == null ? value : replacer.call(this, key, value);
};
}
}, {}], 7: [function (require, module, exports) {
}, {}], 8: [function (require, module, exports) {
// shim for using process in browser
var process = module.exports = {};
@ -1074,7 +1074,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
process.umask = function () {
return 0;
};
}, {}], 8: [function (require, module, exports) {
}, {}], 9: [function (require, module, exports) {
(function (process) {
'use strict';
@ -1196,7 +1196,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports.End = symbols.End;
module.exports.Gunner = module.exports;
}).call(this, require('_process'));
}, { "./lib/caller": 12, "./lib/emitter": 13, "./lib/expect": 14, "./lib/testrunner": 15, "./reporters": 17, "./util": 20, "./util/symbols": 21, "_process": 7 }], 9: [function (require, module, exports) {
}, { "./lib/caller": 13, "./lib/emitter": 14, "./lib/expect": 15, "./lib/testrunner": 16, "./reporters": 18, "./util": 21, "./util/symbols": 22, "_process": 8 }], 10: [function (require, module, exports) {
var _require2 = require('../util'),
isPromise = _require2.isPromise;
@ -1227,7 +1227,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
};
module.exports = assertPromise;
}, { "../util": 20 }], 10: [function (require, module, exports) {
}, { "../util": 21 }], 11: [function (require, module, exports) {
var isEq = require('@codefeathers/iseq');
var U = require('../util');
var _ = U.taggedStringify;
@ -1352,7 +1352,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports.match = module.exports.deepEquals;
module.exports.greaterThanOrEqualTo = module.exports.gte;
module.exports.lessThanOrEqualTo = module.exports.lte;
}, { "../util": 20, "@codefeathers/iseq": 2 }], 11: [function (require, module, exports) {
}, { "../util": 21, "@codefeathers/iseq": 2 }], 12: [function (require, module, exports) {
// Only imported for JSDoc
/* eslint-disable-next-line */
var Gunner = require('../gunner');
@ -1386,18 +1386,26 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
};
module.exports = buildTestTree;
}, { "../gunner": 8, "../util/symbols": 21 }], 12: [function (require, module, exports) {
var _require3 = require('../util'),
isPromise = _require3.isPromise;
}, { "../gunner": 9, "../util/symbols": 22 }], 13: [function (require, module, exports) {
var _require3 = require('perf_hooks'),
performance = _require3.performance;
var _require4 = require('../util'),
isPromise = _require4.isPromise;
var caller = function caller(test, state) {
var perf = { start: 0, end: 0 };
var value = void 0,
error = void 0,
errored = void 0;
try {
perf.start = performance.now();
value = test(state);
perf.end = performance.now();
} catch (e) {
perf.end = performance.now();
errored = true;
error = e;
}
@ -1406,12 +1414,23 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
if (promise) {
return value.then(function (res) {
return { status: 'ok', resolve: res, promise: true };
return {
duration: performance.now() - perf.start,
status: 'ok',
resolve: res,
promise: true
};
}).catch(function (rej) {
return { status: 'notOk', rejection: rej, promise: true };
return {
duration: performance.now() - perf.start,
status: 'notOk',
rejection: rej,
promise: true
};
});
} else {
return Promise.resolve(_extends2({
duration: perf.end - perf.start,
status: errored ? 'notOk' : 'ok'
}, !errored && { value: value }, errored && { error: error }, {
promise: false
@ -1420,7 +1439,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
};
module.exports = caller;
}, { "../util": 20 }], 13: [function (require, module, exports) {
}, { "../util": 21, "perf_hooks": 5 }], 14: [function (require, module, exports) {
var EventEmitter = require('events');
var GunnerEmitter = function (_EventEmitter) {
@ -1436,12 +1455,12 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
}(EventEmitter);
module.exports = new GunnerEmitter();
}, { "events": 5 }], 14: [function (require, module, exports) {
}, { "events": 6 }], 15: [function (require, module, exports) {
'use strict';
var _require4 = require('../util'),
liftPromise = _require4.liftPromise,
lowerCaseFirstLetter = _require4.lowerCaseFirstLetter;
var _require5 = require('../util'),
liftPromise = _require5.liftPromise,
lowerCaseFirstLetter = _require5.lowerCaseFirstLetter;
var library = require('./assertionsLibrary');
var assertPromise = require('./assertPromise');
@ -1501,17 +1520,20 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports = expect;
module.exports.expectMany = expectMany;
}, { "../util": 20, "./assertPromise": 9, "./assertionsLibrary": 10 }], 15: [function (require, module, exports) {
}, { "../util": 21, "./assertPromise": 10, "./assertionsLibrary": 11 }], 16: [function (require, module, exports) {
// Only imported for JSDoc
/* eslint-disable-next-line */
var Gunner = require('../gunner');
Promise.object = require('@codefeathers/promise.object');
var _require5 = require('../util'),
last = _require5.last,
pipe = _require5.pipe,
pick = _require5.pick,
assignToObject = _require5.assignToObject;
var _require6 = require('perf_hooks'),
performance = _require6.performance;
var _require7 = require('../util'),
last = _require7.last,
pipe = _require7.pipe,
pick = _require7.pick,
assignToObject = _require7.assignToObject;
var buildTestQueue = require('./buildTestQueue');
@ -1547,13 +1569,15 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
return toSkip ? { status: 'skip', description: toSkip } : item.unit.run(state);
}).then(function (result) {
var status = result.status;
var status = result.status,
duration = result.duration;
if (item.type === '@test') {
var resultObject = _extends2({
status: status,
duration: duration,
description: item.unit.description
}, (status === 'notOk' || status === 'skip') && { reason: result.error || result.rejection || result.description });
acc.results.push(resultObject);
@ -1594,11 +1618,16 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
*/
var testrunner = function testrunner(instance) {
return Promise.object(pipe(buildTestQueue, reduceQueue, pick('results'))(instance));
var perf = { start: performance.now() };
return Promise.object(pipe(buildTestQueue, reduceQueue, pick('results'))(instance)).then(function (results) {
results.duration = performance.now() - perf.start;
return results;
});
};
module.exports = testrunner;
}, { "../gunner": 8, "../util": 20, "./buildTestQueue": 11, "@codefeathers/promise.object": 3 }], 16: [function (require, module, exports) {
}, { "../gunner": 9, "../util": 21, "./buildTestQueue": 12, "@codefeathers/promise.object": 3, "perf_hooks": 5 }], 17: [function (require, module, exports) {
var statusMap = {
'ok': ['ok', '✅'],
@ -1637,7 +1666,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports = Default;
module.exports.convert = convert;
}, {}], 17: [function (require, module, exports) {
}, {}], 18: [function (require, module, exports) {
module.exports = {
default: require('./default'),
@ -1645,7 +1674,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
xunit: require('./xunit')
};
}, { "./default": 16, "./tap": 18, "./xunit": 19 }], 18: [function (require, module, exports) {
}, { "./default": 17, "./tap": 19, "./xunit": 20 }], 19: [function (require, module, exports) {
var statusMap = {
'ok': 'ok',
@ -1672,7 +1701,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports = TAP;
module.exports.convert = convert;
}, {}], 19: [function (require, module, exports) {
}, {}], 20: [function (require, module, exports) {
var tag = function tag(name, attrs, close, content) {
var end = close ? "/>" : ">";
var pairs = [];
@ -1686,7 +1715,6 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
tag = "<" + name + (pairs.length ? " " + pairs.join(" ") : "") + end;
if (content) {
// content = content instanceof String ? content : escape(content);
tag += content + "</" + name + end;
}
return new String(tag);
@ -1700,14 +1728,20 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
return '<?xml version="1.0"?>' + tag('testsuites', {}, false, tag('testsuite', {
name: results.name,
tests: count,
success: success.length,
failures: failures.length,
skipped: skipped.length
skipped: skipped.length,
timestamp: new Date().toUTCString(),
time: results.duration / 1000 || 0
}, false, results.reduce(function (acc, r) {
var close = r.status === 'ok';
var content = r.status !== 'ok' && (r.status === 'skip' ? tag('skipped', {}, true) : tag('failure', {}, !r.reason, r.reason ? escape(r.reason) : ''));
acc += tag('testcase', { name: escape(r.description) }, close, content || '');
var content = r.status !== 'ok' && (r.status === 'skip' ? tag('skipped', {}, true) : tag('failure', {}, !r.reason, r.reason ? r.reason : ''));
acc += tag('testcase', {
name: r.description,
time: r.duration / 1000 || 0
}, close, content || '');
return acc;
}, '')));
};
@ -1721,7 +1755,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
module.exports = xunit;
module.exports.convert = convert;
}, {}], 20: [function (require, module, exports) {
}, {}], 21: [function (require, module, exports) {
var _stringify = require('json-stringify-safe');
var isObject = function isObject(x) {
@ -1928,7 +1962,7 @@ function _toConsumableArray2(arr) { if (Array.isArray(arr)) { for (var i = 0, ar
}
};
}, { "json-stringify-safe": 6 }], 21: [function (require, module, exports) {
}, { "json-stringify-safe": 7 }], 22: [function (require, module, exports) {
module.exports = {
Start: Symbol('Start'),

Loading…
Cancel
Save