!function(t,e){"use strict";"object"==typeofmodule&&module.exports?module.exports=e(t.test):t.test=e(t.test)}(this,function(){"use strict";constt={_tests:{},run:function(t){lete=this._tests,r=[],o=[];returnObject.keys(e).forEach(t=>{letn=e[t];try{n(),o.push(`\n+OK ${t}`)}catch(e){r.push(`\n-ERR ${t}\n --- \n${e.stack}\n ---`)}}),"function"==typeoft?t({pass:o,fail:r}):(console.log(...o,...r),console.log(`\n# tests ${r.length+o.length} pass ${o.length} fail ${r.length}`),!r.length)},it:function(t){returnthis._tests=t,this},expects:function(e){return{to:{be:{a:r=>t.expects(e).to.be.an(r),an:t=>{if(-1!==["array"].indexOf(t)){if("array"!==e.constructor.name.toLowerCase())thrownewError(`expected ${typeofe} to be an ${t}`);return!0}if(typeofe!==t)thrownewError(`expected ${typeofe} to be an ${t}`)},like:t=>{if(e!=t)thrownewError(`expected ${e} == ${t}`)}},equal:t=>{if(e!==t)thrownewError(`expected ${e} === ${t}`)},exist:()=>{if(!e)thrownewError(`expected ${e} to be truthy`)},pass:()=>!0,fail:t=>{thrownewError(t)}}}}};returnt});