VimUnDoPs÷30jaZ\:& [VVVVN_Mi*var Assert = require('test/assert').Assert5_Mk! , Log = require('test/log').Log5_M 'use strict'5_M5_ M 'use strict'5_ vM( 'var Assert = require('./assert').Assert5_ vM+&  , Log = require('./log').Log5_ vM 5_ vM '/* vim:set ts=2 sw=2 sts=2 expandtab */L/*jshint asi: true newcap: true undef: true es5: true node: true devel: true forin: true *//*global define: true */'/* vim:set ts=2 sw=2 sts=2 expandtab */5_ vM  'use strict';5_ vM 5_ vM 5_  vM %5_ vM 5_  vM O'*  *var Assert = require('./assert.js').Assert! , Log = require('./log.js').Log // constancts5 , ERR_COMPLETED_ASSERT = 'Assert in completed test'J , ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times'! , ERR_EXPECT = 'AssertionError'/**; * Test constructor. Wrapper of the CommonJS test function. */function Test(options) {* var test = Object.create(Test.prototype,! { name: { value: options.name }! , mute: { value: options.mute }! , unit: { value: options.unit } , log: { value: options.log } , passes: { value: [] } , fails: { value: [] } , errors: { value: [] } })$ test.assert = options.Assert(test) return test}Test.prototype ={ constructor: Test/** * Name of the test unit. * @param {String} */ , name: null/**L * Instance of Logger used to log results of the tests. All the nested tests/ * and suites will get sub-loggers of this one. * @type {Logger} */ , log: null/**? * CommonJS test function that is being wrapped by this object. * @type {Function} */ , unit: null/**5 * Array of all the `AssertError`s for the this unit. * @type {AssertError[]} */ , fails: null/**G * Array of the exceptions that occured during execurtion of this unit. * @type {Error[]} */, errors: null/*** * Array of the passed assertion messages. * @type {String[]} */, passes: null/**N * Wheather or not test execution is finished. Used for logging errors for all8 * the asserts that are executed after test is finished. */, completed: false , pass: function pass(message) { message = message || ''J if (this.completed) return this.error(new Error(ERR_COMPLETED_ASSERT)) this.passes.push(message)* if (!this.mute) this.log.pass(message) }, fail: function fail(e) {J if (this.completed) return this.error(new Error(ERR_COMPLETED_ASSERT)) this.fails.push(e)$ if (!this.mute) this.log.fail(e) }, error: function error(e) { this.errors.push(e)% if (!this.mute) this.log.error(e) }), complete: function complete(callback) {L if (this.completed) return this.error(new Error(ERR_COMPLETED_COMPLETE))) callback(this, this.completed = true) }, run: function run(callback) { var unit = this.unit , sync = unit.length <= 1# , failFast = unit.length == 0 , assert = this.assertE , complete = this.complete = this.complete.bind(this, callback) try {/ if (!this.mute) this.log.print(this.name) unit(assert, complete) if (failFast) this.pass() if (sync) this.complete() } catch(e) {. if (ERR_EXPECT == e.name) assert.fail(e) else assert.error(e) this.complete() } }}/**M * Test suite / group constructor. All the tests in the suite can be executed0 * by calling `run` method on returned instance. * @param {Object} options * Options with keys: * @param {Object} tests< * List of test functions / sublists of test functions. * @param {Log} logK * Logger for this Suite. If this is sub-suite logger provided will be6 * smart enough to indent results for this suite. * @param {Assert} AssertK * Assertions constructor. Constructor is used to construct individual * assert objects per test. */function Suite(options) { var log = options.log , units = [] , unitMap = options.units for (var name in unitMap) {, if (0 !== name.indexOf('test')) continue var unit = unitMap[name]: units.push(('function' == typeof unit ? Test : Suite)( { name: name , mute: options.mute , units: unit , unit: unit& , Assert: unitMap.Assert || Assert , log: log.section() })) }' return Object.create(Suite.prototype,! { name: { value: options.name }! , mute: { value: options.mute } , log: { value: log } , units: { value: units } })} Suite.prototype = Object.create( { constructor: Suite /** * Name of the test unit. * @param {String} */ , name: null /**N * Instance of Logger used to log results of the tests. All the nested tests1 * and suites will get sub-loggers of this one. * @type {Logger} */ , log: null /**7 * Array of all the `AssertError`s for the this unit. * @type {AssertError[]} */ , fails: null /**I * Array of the exceptions that occured during execurtion of this unit. * @type {Error[]} */ , errors: null /**, * Array of the passed assertion messages. * @type {String[]} */ , passes: null /**0 * List of tests / suites to run on execution. * @type {Suite|Test[]} */ , units: null /**? * Index of the test that will be executed on calling `next`. * @type {Number} */ , index: 0 /**J * Callback that is called when all the tests in the suite are executed. * @type {Function} */ , complete: null /**P * Calling this function executes all the tests in this and all the subsuites.< * Passed callback is called after all tests are finished. * @param {Function} callbackA * Function that will be called once whole suite is executed */! , run: function run(callback) {/ if (!this.mute) this.log.print(this.name) this.complete = callback& this.next = this.next.bind(this) this.next() } /**G * Runs next test / suite of tests. If no tests are left in the suite9 * callback passed to the run method is called instead. */ , next: function next() { var units = this.units& if (this.index < units.length) {+ units[this.index ++].run(this.next) } else this.complete(this) } }., { passes: { get: UnitedProprerty('passes') }, , fails: { get: UnitedProprerty('fails') }. , errors: { get: UnitedProprerty('errors') } }) function UnitedProprerty(name) { return function Property() {4 return this.units.reduce(function(value, unit) {% return value.concat(unit[name]) }, []) }}/** * Runs passed tests. */function run(units, callback) { var log = Log() Suite( { name: 'Running all tests:' , units: units , mute: units.mute === true , log: log } ).run(function(suite) {( if (callback) return callback(suite) if (suite.mute) return log.print% ( 'Passed:' + suite.passes.length% + ' Failed:' + suite.fails.length& + ' Errors:' + suite.errors.length ) })}exports.run = run5_ **vM T , 5_ !**vM V ,! Log = require('./log.js').Log5_ **vM Y ," Log = require('./log.js').Log,5_ "**vM [ ,"var Log = require('./log.js').Log,5_ +**vM ]  ,+var Assert = require('./assert.js').Assert,5_ )**vM d ,5_ ++vM e  5_ **vM k , ,5_**vM r ,6 ERR_COMPLETED_ASSERT = 'Assert in completed test',5_**vM s ,3 ERR_COMPLETED_ASSERT = 'Assert in completed test',5_**vM ,K ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5_**vM ,K3 ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5_**vM ,K ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5_**vM ,H ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5_ **vM ,! ERR_EXPECT = 'AssertionError'5_! K**vM ,Kvar ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5_ "!6**vM   ,6var ERR_COMPLETED_ASSERT = 'Assert in completed test',5_!#"**vM , 5_"$#**vM , 5_#%$**vM  5_$&%))vM  5_%'&((vM  5_&('vM  ) /**? * Test constructor. Wrapper of the CommonJS test function. */5_')(2vM 13) constructor: Test5_(*)7vM 67 ,5_)+*7 vM 68( name: null5_*,+=vM <= ,5_+-,= vM <>' log: null5_,.-BvM AB ,5_-/.B vM AC& unit: null5_.0/GvM FG ,5_/10G vM FH% fails: null5_021LvM KL ,5_132LvM KM$ errors: null5_243QvM PQ ,5_354QvM PR# passes: null5_465VvM (UV ,5_576rvM qs" unit(assert, complete)5_687p vM oq" try {5_798lvM jl" var unit = this.unit,sync = unit.length <= 1,km" sync = unit.length <= 1,5_8:9lvM jl!2 var unit = this.unit, sync = unit.length <= 1,failFast = unit.length == 0,km!$ failFast = unit.length == 0,5_9;:mvM km  assert = this.assert,=complete = this.complete = this.complete.bind(this, callback)ln E complete = this.complete = this.complete.bind(this, callback)5_:<;lvM kn[ assert = this.assert, complete = this.complete = this.complete.bind(this, callback)5_;=<nvM mo  try {5_<?=mvM mo 5_=@>?jvMjl" jl!5_?A@lvMkm"O var unit = this.unit, sync = unit.length <= 1, failFast = unit.length == 0,5_@BAlvMkn"K unit = this.unit, sync = unit.length <= 1, failFast = unit.length == 0,5_ACBmvMlo#9 sync = unit.length <= 1, failFast = unit.length == 0,5_BDCn vM"mo$ failFast = unit.length == 0,5_CEDovM#np$ assert = this.assert,5_DFEovM*np$ assert = this.assert,5_EGFnvM/mo$ failFast = unit.length == 05_FHGn vM0mo$ failFast = (unit.length == 05_GIHnvM5mo$! failFast = (unit.length == 0)5_HJIn"vM7mo$" failFast = !!unit.length == 0)5_IKJpvM;oq$E complete = this.complete = this.complete.bind(this, callback)5_JLKt vMAsu$ unit(assert, complete)5_KMLwvMDvx$ } catch (e) {5_LNM{vMFz|$ }5_MONwvMLvx$ } catch (e) {5_NPO{vMNz|$ }5_OQPssvvMTrw$1 if (!this.mute) this.log.print(this.name) unit(assert, complete)! if (failFast) this.pass()! if (sync) this.complete()5_PRQxxzvMW)w{$0 if (ERR_EXPECT == e.name) assert.fail(e) else assert.error(e) this.complete()5_QSRxzvM_ 5_RTSxzvM` 5_SUTxzvM` 5_TVUxzvMa!5_UWV xzvMe" var log = options.log,5_VXWxzvMo# units = [],5_WYXxzvMp# units = [],5_XZYxzvMq# log = options.log,5_Y[ZxzvMs# unitMap = options.units5_Z\[ xzvMu# units = [],5_[]\xzvM}# forin: true */5_\`]%xzvM#, if (0 !== name.indexOf('test')) continue5_]a_`,xzvM#, if (0 !== name.indexOf('test')) continue5_`baxzvM# units: { value: units# value: units5_acbxzvM" units: { value: units}" }5_bdcxzvM! log: { value: log! value: log5_cedxzvM  log: { value: log},  },5_dfexzvM mute: {value: options.mute value: options.mute5_egfxzvM mute: { value: options.mute}, },5_fhgxzvM name: {value: options.name value: options.name5_gihxzvM name: { value: options.name}, },5_hjixzvM constructor: Suite5_ikjxzvM ,5_jlk xzvM name: null5_kmlxzvM ,5_lnm xzvM log: null5_monxzvM ,5_npo xzvM fails: null5_oqpxzvM ,5_prqxzvM errors: null5_qsrxzvM ,5_rtsxzvM passes: null5_sutxzvM ,5_tvu xzvM units: null5_uwvxzvM ,5_vxw xzvM index: 05_wyxxzvM ,5_xzyxzvM complete: null5_y{zxzvM ,5_z|{xzvM }5_{}|xzvM ,5_|~}xzvM passes: {get: UnitedProprerty('passes')" get: UnitedProprerty('passes')5_}~xzvM* passes: { get: UnitedProprerty('passes')}, },5_~xzvM fails: {get: UnitedProprerty('fails')! get: UnitedProprerty('fails')5_xzvM( fails: { get: UnitedProprerty('fails')}, },5_xzvM  errors: {get: UnitedProprerty('errors') " get: UnitedProprerty('errors')5_xzvM * errors: { get: UnitedProprerty('errors')}  }5_xzvM s log.print('Passed:' + suite.passes.length + ' Failed:' + suite.fails.length + ' Errors:' + suite.errors.length)5_(xzvM k 'Passed:' + suite.passes.length + ' Failed:' + suite.fails.length + ' Errors:' + suite.errors.length)5_(xzvM  I ' Failed:' + suite.fails.length + ' Errors:' + suite.errors.length)5_xzvM log.print(!'Passed:' + suite.passes.length +' 'Passed:' + suite.passes.length +5_xzvM ' ' Failed:' + suite.fails.length +5_xzvM# ' ' Errors:' + suite.errors.length)5_xzvM@*  if (suite.mute) return5_nxzvMWmo  failFast = !!unit.length5_nxzvMY+mo ! failFast = !!unit.length == 05_nxzvMamo  failFast = unit.length == 05_n xzvMb,mo  failFast = !unit.length == 05_ Na  !var Log = require('./log.js').Log5_ Nd  %var Log = require('./loggers.js').Log5_ !Nf  *var Assert = require('./assert.js').Assert5_ Nj  !var Log = require('./logger').Log5_ $Nl-  $var Logger = require('./logger').Log5_Nw function run(units, callback) {5_ N}  var log = Log()5_NЃ  var logger = Log()5_NЄ  logger = Log()5_NЕ.  logger = logger || logger5_N mute: units.mute === true,5_N  log: log5_N/  logger: log5_vN  }).run(function (suite) {( if (callback) return callback(suite) if (suite.mute) return null/ log.print('Passed:' + suite.passes.length +/ ' Failed:' + suite.fails.length +/ ' Errors:' + suite.errors.length) })}5_vN0 })}5_vN*5_vNX Object.keys()5_vNZ Object.keys(unitMap)5_vNd Object.keys(unitMap).forEach()5_)vNh* Object.keys(unitMap).forEach(function())5_+vNh- Object.keys(unitMap).forEach(function() {})5_vNp  5_,v,N~  if 5_,,v,NԈ - if (0 !== name.indexOf('test')) continue;5_+,v,NԌ + if (0 !== name.indexOf('test')) return;5_(,v,Nԑ1 + Object.keys(unitMap).forEach(function() {5_+,v,NԘ   5_,v,NԿ2 function Suite(options) {5_,v,N log = options.log5_,v,N units = []5_,v,N unitMap = options.units5_,v,N var log, units, unitMap5_,v,N5_,v,N/ Object.keys(unitMap).forEach(function(name) {5_,v,N5_,v,N 5_,v,N if ()5_,v,N if (typeof())5_,v,N if (typeof(units[]))5_,v,N! if (typeof(units[name]))5_!,v,N## if (typeof(units[name]) === '')5_ ) v N)+ if (typeof(units[name]) === 'function')5_ ) v N*! if (typeof(units[name]) === )5_) v N, if (typeof(units[name]))5_) v N0 5_ ) v N> test()5_) v NA test(options[])5_) v NE test(options[])5_) v NJ 5_) v NL 5_) v NR var u5_*) v NU- Object.keys(units).forEach(function(name) {5_) v NW5_(v(N`+ if ('function' === typeof(units[name]))5_ (v(Na unit = 5_(v(Nd if ('function' === typeof())5_(v(Ng test(unitMap)5_(v(Ns test(unit, logger5_(v(NՊfunction Suite(units, logger) {5_(v(Nլ Suite 5_ (v(Nմ  Suite()5_!(v(Nվ # Suite(unit, logger.section())5_&(v(N ' Suite(unit, logger.section(name))5_(%vN ) Suite(unit, logger.section(name), )5_%vN 'function Suite(units, logger, Assert) {5_%vN -function Suite(name, units, logger, Assert) {5_ %vN 0 test(unit, logger, units.Assert || Assert)5_%vN  for (var name in unitMap) {5_%vN - if (0 !== name.indexOf('test')) continue;5_%vN  var unit = unitMap[name]5_%vN ; units.push(('function' == typeof unit ? Test : Suite)({5_%vN  name: name,5_%vN  mute: options.mute,5_%vN  units: unit,5_%vN unit: unit,5_%vN' Assert: unitMap.Assert || Assert,5_%vN log: log.section()5_%vN }))5_%vN }5_%vN5_%vN) return Object.create(Suite.prototype, {5_%vN" name: { value: options.name },5_%vN" mute: { value: options.mute },5_%vN log: { value: log },5_%vN units: { value: units }5_%vN })5_~%vN=~~5_ %vNbfunction suite5_ %vNlfunction suite()5_%vNmfunction Suite()5_%vNnfunction Suite() {}5_ %vNq 5_%vNz return function suite()5_%vN{ return function suite() {}5_%vN} return function suite() {5_%vNֈfunction Suite() {5_vN֝ 5_vN֩ return function suite()5_vN֫ return function suite() {}5_vN֬ return function suite() {5_vNֳ3 Object.keys(units).forEach(function(name, unit) {0 if (0 !== name.indexOf('test')) return false unit = units[name]$ if ('function' === typeof(unit))6 test(name, unit, logger, units.Assert || Assert) else9 Suite(unit, logger.section(name), Assert || Assert) })5_vNֶ 5_vNּfunction Suite(units) {5_vNּ% return function suite(next, stop) {5_vNֽ }5_vNֽ3}5_vNf8 test(name, unit, logger, units.Assert || Assert)5_8vNl8 Test(name, unit, logger, units.Assert || Assert)5_Y9vNl: Test(name, unit, logger, units.Assert || Assert)()5_ZYvN܎5 Object.keys(units).forEach(function(name, unit) {5_Y[Z-vNܚD Object.keys(units).filter(isTest).forEach(function(name, unit) {5_Z\[vNܝ5_[]\vNܢfunction isTest()5_\^]vNܣfunction isTest(name)5_]_^vNܤfunction isTest(name) {}5_^`_vNܥ 5__a`vNܫ ''5_`bavNܷ name.indexOf()5_acbvNܷ name.indexOf('')5_bdcvNܾ name.indexOf('test')5_cedvNfunction isTest(name) {!return 0 === name.indexOf('test')# return 0 === name.indexOf('test')5_dfevN89function isTest(name) { return 0 === name.indexOf('test')}}5_egfvN2 if (0 !== name.indexOf('test')) return false5_fhgvN 5_gih vN Unit()5_hjivN Unit(name, units[])5_ikjvN Unit(name, units[name])5_jlkvN- Unit(name, units[name], logger, Assert)5_kml vN  5_lnmvN@ Object.keys(units).filter(isTest).map(function(name, unit) {5_mon"vN% return function suite(next, stop) {5_npovN return function suite(units) {5_oqpvN"A vObject.keys(units).filter(isTest).map(function(name, unit) {5_prqvN75_qsrvNE 5_rtsvNK function next()5_sutvNK function next() {}5_tvuvNM 5_uwv vN` var unit.shift()5_vxwvNb var unit = unit.shift()5_wyxvNc 5_xzy vNm unit()5_y{z vNo if ()5_z|{vNv if (unit)5_{}|vNz if (unit) unit()5_|~}vN݅ return function suite() {5_}~vNݑ5_~vNݔ return function suite(next) {5_vNݖ95_vNݧ done = done || logger.report5_vNݪ 5_vNݯ else if ()5_vNݱ else if (done)5_vNݷ 5_ vNݼ else ()5_vN 5_vN return function suite(done) {5_vNL var units = Object.keys(units).filter(isTest).map(function(name, unit) {5_vN }5_vN4 return Unit(name, units[name], logger, Assert)5_vN function next() { var unit = units.shift() if (unit) unit(next) else if (done) done() else logger.report() }5_ vN next()5_vN function next() {5_vN 5_vN5_vN unit = units[name]5_vN& if ('function' === typeof(unit))5_vN> Test(name, unit, logger, units.Assert || Assert)(next)5_vN else5_vN; Suite(unit, logger.section(name), Assert || Assert)5_vN })5_vN }5_vN5_vNfunction Unit()5_vNfunction Unit(unit)5_vNfunction Unit(unit) {}5_vN 5_vN return typeof()5_vN  return typeof(unit)5_vN! return typeof(unit) === ''5_$vN#$ return typeof(unit) === 'function'5_,vN(- return typeof(unit) === 'function' ? Test()5_vN+function Unit(unit) {5_vN.function Unit(name, unit) {5_0vN=1 return typeof(unit) === 'function' ? Test(name)5_FvNb 5_-vNj. : Suite()5_BvNsD : Suite(unit, logger.section())5_GvNt:H : Suite(unit, logger.section(name))5_1vN~P : Suite(unit, logger.section(name), Assert)5_%vNހH return typeof(unit) === 'function' ? Test(name, units, logger, Assert),: Suite(units, logger.section(name), Assert)Q : Suite(units, logger.section(name), Assert)5_KvNނu return typeof(unit) === 'function' ? Test(name, units, logger, Assert) : Suite(units, logger.section(name), Assert)5_'vNފJ return typeof(unit) === 'function' ? Test(name, units, logger, Assert) :5_'vNޏQ Suite(units, logger.section(name), Assert)5_-vNި, var test = Object.create(Test.prototype, { name: { value: options.name }, mute: { value: options.mute }, unit: { value: options.unit }, log: { value: options.log }, passes: { value: [] }, fails: { value: [] }, errors: { value: [] } })5_vNު 5_vNެfunction Test(options) {5_(v(N function Test(name, options, ) {5_(v(N constructor: Test,5_(v(N /**5_(v(N * Name of the test unit.5_(v(N * @param {String}5_(v(N */5_(v(N name: null,5_(v(N /**5_(v(NN * Instance of Logger used to log results of the tests. All the nested tests5_(v(N1 * and suites will get sub-loggers of this one.5_~~(v(N * @type {Logger}5_}}(v(N */5_||(v(N log: null,5_{{(v(N /**5_zz(v(NA * CommonJS test function that is being wrapped by this object.5_yy(v(N * @type {Function}5_xx(v(N */5_ww(v(N unit: null,5_vv(v(N /**5_uu(v(N7 * Array of all the `AssertError`s for the this unit.5_tt(v(N * @type {AssertError[]}5_ss(v(N */5_rr(v(N fails: null,5_qq(v(N /**5_pp(v(NI * Array of the exceptions that occured during execurtion of this unit.5_oo(v(N * @type {Error[]}5_nn(v(N */5_mm(v(N errors: null,5_ll(v(N /**5_kk(v(N, * Array of the passed assertion messages.5_jj(v(N * @type {String[]}5_ii(v(N */5_hh(v(N passes: null,5_gg(v(N /**P * Wheather or not test execution is finished. Used for logging errors for all5_ee(v(N: * the asserts that are executed after test is finished.5_dd(v(N */5_ cc(v(N return test5_cc(v(N return function test()5_cc(v(N return function test() {}5_ 1AvN* 5_BRvN$,function Test(name, units, logger, Assert) {5_BRvN% unit = this.unit5_AQvN* 5_BRvN/$ test.assert = options.Assert(test)5_BRvN3# var assert = options.Assert(test)5_BRvNA var assert = Assert(test)5_BRvNM var assert = Assert(logger)5_%BRvNP' var assert = Assert(logger.section())5_BRvN\;+function Test(name, unit, logger, Assert) {5_uvv)v)Nltv, Test(name, units, logger, Assert) :5_uvv)v)Nn<tv& Test(units, logger, Assert) :5_*vv)v)Nz+ var assert = Assert(logger.section(name))5_vv)v)N߃ var 5_vv)v)Nߏ sync = unit.length <= 15_uu)v)Nߑ 5_vv)v)Nߡ failFast = !unit.length5_uu)v)Nߣ assert = this.assert5_tt)v)N߬ return function test() {5_tt)v)N߼A complete = this.complete = this.complete.bind(this, callback)5_ss)v)N߼=5_rr)v)N return function test(next) {5_rr)v)N/ if (!this.mute) this.log.print(this.name)5_qq)v)N> unit(assert, complete)5_qq)v)N? var failFast = !unit.length5_qq)v)N  if (failFast) this.pass()5_qq)v)N@! if (isFailFast) this.pass()5_"qq)v)N%# if (isFailFast) logger.pass()5_#qq)v)N&A% if (isFailFast) logger.pass('')5_qq)v)N*  if (sync) this.complete()5_qq)v)N./ var unit, sync, failFast, assert, complete;5_pp)v)N4! if (isSync) this.complete()5_"pp)v)N;!# this.complete()5_pp)v)NF return function test(done) {5_pp)v)NH 5_qq)v)NM function done()5_qq)v)NM function done() {}5_rr)v)NZ 5_ss)v)Nb 5_ tt)v)Nd if ()5_tt)v)Ny if (done)5_tt)v)N{ if (isDone)5_<*<JvJN if (isDone) logger.fail()5_<*<JvJN if (isDone) logger.error()5_?<*<JvJN 5_=*=JvJN else isDone()5_=*=JvJNA if (isDone) logger.error(new Error(ERR_COMPLETED_COMPLETE))5_ =*=JvJN 5_   =*=JvJN isDone()5_   =*=JvJN   5_   vN isDone = true5_   vN 5_   vN next()5_ vNH if (isDone) return logger.error(new Error(ERR_COMPLETED_COMPLETE))5_vN next(isDone = true)5_$vN#% } catch (e) {5_$vN#% } catch (exception) {5_%vN$&. if (ERR_EXPECT == e.name) assert.fail(e)5_%vN$&7 if (ERR_EXPECT == exceptions.name) assert.fail(e)5_%7vN$&8 if (ERR_EXPECT === exceptions.name) assert.fail(e)5_%#vN$&@ if (ERR_EXPECT === exceptions.name) assert.fail(exception)5_&vN%' else assert.error(e)5_&!vNB%'" else assert.error(execution)5_*vN*,5_+V+vN#*,,Test.prototype = { completed: false, pass: function pass(message) { message = message || ''J if (this.completed) return this.error(new Error(ERR_COMPLETED_ASSERT)) this.passes.push(message)* if (!this.mute) this.log.pass(message) }, fail: function fail(e) {J if (this.completed) return this.error(new Error(ERR_COMPLETED_ASSERT)) this.fails.push(e)$ if (!this.mute) this.log.fail(e) }, error: function error(e) { this.errors.push(e)% if (!this.mute) this.log.error(e) },) complete: function complete(callback) {L if (this.completed) return this.error(new Error(ERR_COMPLETED_COMPLETE))) callback(this, this.completed = true) }, run: function run(callback) {/ var unit, sync, failFast, assert, complete; unit = this.unit sync = unit.length <= 1 failFast = !unit.length assert = this.assertA complete = this.complete = this.complete.bind(this, callback) try {/ if (!this.mute) this.log.print(this.name) unit(assert, complete) if (failFast) this.pass() if (sync) this.complete() } catch (e) {. if (ERR_EXPECT == e.name) assert.fail(e) else assert.error(e) this.complete() } }}function test()5_=++vNU=? =?5_>++vN[=> return 5_A++vNn@B return function next() {5_ A++vNq@B return function suite() {5_! C++vNBD if (unit) unit(next)5_ "!D++vNCE else if (done) done()5_!#"D++vNCCE else if (next) done()5_"$#MMvNLNF!Suite.prototype = Object.create({ constructor: Suite, /** * Name of the test unit. * @param {String} */ name: null, /**N * Instance of Logger used to log results of the tests. All the nested tests1 * and suites will get sub-loggers of this one. * @type {Logger} */ log: null, /**7 * Array of all the `AssertError`s for the this unit. * @type {AssertError[]} */ fails: null, /**I * Array of the exceptions that occured during execurtion of this unit. * @type {Error[]} */ errors: null, /**, * Array of the passed assertion messages. * @type {String[]} */ passes: null, /**0 * List of tests / suites to run on execution. * @type {Suite|Test[]} */ units: null, /**? * Index of the test that will be executed on calling `next`. * @type {Number} */ index: 0, /**J * Callback that is called when all the tests in the suite are executed. * @type {Function} */ complete: null, /**P * Calling this function executes all the tests in this and all the subsuites.< * Passed callback is called after all tests are finished. * @param {Function} callbackA * Function that will be called once whole suite is executed */ run: function run(callback) {- if (!this.mute) this.log.print(this.name) this.complete = callback$ this.next = this.next.bind(this) this.next() }, /**G * Runs next test / suite of tests. If no tests are left in the suite9 * callback passed to the run method is called instead. */ next: function next() { var units = this.units$ if (this.index < units.length) {( units[this.index++].run(this.next) } else this.complete(this) }}, {- passes: { get: UnitedProprerty('passes') },+ fails: { get: UnitedProprerty('fails') },, errors: { get: UnitedProprerty('errors') }})5_#%$MMUvNLNf function UnitedProprerty(name) { return function Property() {5 return this.units.reduce(function (value, unit) {% return value.concat(unit[name]) }, []) }}5_$&%UMMvNTV^ Suite({5_%'&V MMvNTV^ Unit({'Running all tests:',UW^ name: 'Running all tests:',5_&('UMMvNTV] Unit('Running all tests:',5_')(U,MMvNTV], Unit('Running all tests:', units, logger, 5_(*)U3MMvNTV]3 Unit('Running all tests:', units, logger, Assert)5_)+*T T T v NSU]! logger = logger || new Logger()5_*,+TT T v NST logger = 5_+-,T*T T v NSU\5 Unit('Running all tests:', units, logger, Assert)()5_,.-UT T v NTU units: units,5_-/.UT T v NTU logger: logger5_.0/UT T v NTU })5_/10ST T v NRTYfunction run(units, logger) {5_021VT T v NFUVexports.run = run5_132@T T v NG@BX5_243B U U v NHACY return function suite(next) {5_354>U U v N=?YJ var units = Object.keys(units).filter(isTest).map(function(name, unit) {5_465@U U v N?AY }5_576BU U v NIACY function suite(next) {5_687>"U U v NS>@Z >@Y5_798?V V v NYJ>@Z console.log()5_8:9?V V v NmK>? console.log(name)5_9;:TU U v NpTVZ TVY5_:<;UV V v NvTVZ console.log()5_;=<UV V v NxLTVZ console.log('')5_<>=IV V v NIK[ IKZ5_=?>JW W v NNIK[ console.log()5_>@?JW W v N\OIJ console.log(name)5_?A@UV V v N`PTU console.log('>>>>>>')5_@BABU U v NBDZ BDY5_ACBCV V v NBDZ console.log()5_BDCCV V v NBDZ console.log()5_CEDCV V v NBC console.log(u)5_DFECU U v NCEZ CEY5_EGFDV V v NRCEZ console.log()5_FHGJJJvNJL[ JLZ5_GIHKJJvNJL[ console.log()5_HJIKJJvNSJL[ console.log(unit)5_IKJDJJvNTCE[ console.log(unit)5_JLKDJJvN CE[ console.log(unit.toString())5_KMLDJJvN UCE[ console.log(String())5_LNMDJJvNCD console.log(String(unit))5_MONJIIvNVIJ console.log(name)5_NPO>IIvN>@Z >@Y5_OQP?JJvN5>@Z console.log()5_PSQ?JJvN9Y>@Z console.log(name, units[])5_QWRS?K K#v#N|\>?" console.log(name, units[name])5_SXTWBJ J#v#NBDY5_WYXCK K#v#N]BC5_XZYCJ J#v#NCEZ CEY5_Y[ZDEE v NCEZ console.log()5_Z\[DEE v N^CEZ if (unit) console.log()5_[]\JEE v NJL[ JLZ5_\^]KEE v N_JL[ console.log()5_]_^V)EE v NVX\ VX[5_^`_WEE v NVX\ console.log()5__a`WEE v N `VX\ console.log('')5_`gaWEE v NaVW console.log('>>>>>')5_ahbgKL L#v#NaJK console.log(name)5_gjhKK K#v#NchJLZ& return typeof(unit) === 'function' ?5_hkijDK K#v#NiCEZ if (unit) console.log(unit)5_jlkK K#v#N+[ Z5_kmlL L#v#N0[ console.log()5_lnmL L#v#N1[ console.log('')5_monL L#v#N4[ console.log('running test')5_npo#L L#v#N7k[$ console.log('running test', new)5_oqpL L#v#N<l% console.log('running test', next)5_prqDK K#v#N@mCD% if (unit) console.log(unit, next)5_qsrJ J#v#NYA if (isDone) logger.error(new Error(ERR_COMPLETED_COMPLETE))5_rtsJ J#v#NYJ if (isDone) returned logger.error(new Error(ERR_COMPLETED_COMPLETE))5_sutvNY else next(isDone = true)5_tvuvNZ Y5_uwvvNZ isDone = true5_vxw vNn Z else next()5_wyx>vNqA=?Z'function Suite(units, logger, Assert) {5_xzyCvNqFCE[ CEZ5_y{zDvNqRoCE[ logger = logger.section()5_z|{MvNq^LN[4 Test(units, logger.section(name), Assert) :5_{}|M/vNqaLN[: Test(name, units, logger.section(name), Assert) :5_|~}N*vNqfMO[3 Suite(units, logger.section(name), Assert)5_}~NvNqhpMO[% Suite(units, logger, Assert)5_~M vNqmKM[' return typeof(units) === 'function' ?#Test(name, units, logger, Assert) :LN[, Test(name, units, logger, Assert) :5_M vNqoLNZ+ Suite(name, units, logger, Assert)5_LKvNqsqKMZK return typeof(units) === 'function' ? Test(name, units, logger, Assert) :5_vNqrZ%function Test(unit, logger, Assert) {5_vNq[ Z5_  vNqs[ logger = logger.section()5_J  vNrtIK\ }JL\ JL[5_D  vNrCE[ return function suite(next) {5_D   vNrCE[ return function next(next) {5_D  vNrCE[ function next(next) {5_G  vNrFH[ if (unit) unit(suite)5_H  vNrGI[ else if (next) next()5_H  vNrGI[ else if (done) next()5_J  vNrJM\ JL[5_L   vNrKM] return sut5_L  vNrKM] return function suite()5_L  vNrKM] return function suite(title)5_L   vNrKN]! return function suite(title) {}5_L  vNrKM^ return function suite(title) {5_EE EvNrDF^! logger = logger.section(name)5_EE EvNrDE 5_KE EvNrKM^ KM]5_L E EvNrLN_ LN^5_KE EvNrJL_ return function suite(name) {5_M E EvNrvLN_ next()5_(E EvNsz')_" else assert.error(exception)5_A E EvNtO@B_2 return Unit(name, units[name], logger, Assert)5_A,A,ARvRNta@B_S return { name: name, unit: units[name] }Unit(name, units[name], logger, Assert)5_@CA,ARvRNtg?A_F units = Object.keys(units).filter(isTest).map(function(name, unit) {5_FA,ARvRNtjEG_ if (unit) unit(next)5_F$A,ARvRNtnEG_5 if (unit) Unit(name, units[name], logger, Assert)5_F/A,ARvRNtuEG_/ if (unit) Unit(name, units, logger, Assert)5_F0A,ARvRNtu{EG_1 if (unit) Unit(name, units, logger, Assert)()5_FA,ARvRNtEG_5 if (unit) Unit(name, units, logger, Assert)(next)5_F#A,ARvRNtEG_: if (unit) Unit(unit.name, units, logger, Assert)(next)5_F(A,ARvRNtEG_? if (unit) Unit(unit.name, unit.units, logger, Assert)(next)5_&A,ARvRNt&(` &(_5_'B,BRvRNt&(` console.trace()5_ B,BRvRNwa `5_C,CRvRNwa logger.pass()5_C,CRvRNwa logger.pass('')5_C,CRvRNw logger.pass('<<<')5_vNw` var assert = Assert(logger)5_vNw 5_vNw` _5_\$\$\9v9NzH[]`E Unit('Running all tests:', units, logger || new Logger(), Assert)()5_[$\$\9v9NzI[]a []`5_\]$]9v9NzL[]a logger || new Logger()5_]$]$]9v9NzP\^a/ Unit('Running all tests:', units, , Assert)()5_]5]$]9v9NzT\^a5 Unit('Running all tests:', units, logger, Assert)()5_]>]$]9v9NzV\^a> Unit('Running all tests:', units, logger, Assert)(function()5_]@]$]9v9NzV\_aA Unit('Running all tests:', units, logger, Assert)(function() {}5_^]$]9v9NzX]_b }5_]]$]9v9NzY]_c ]_b5_@]$]9v9N{@Bd @Bc5_A^$^9v9N{ @Bd console.log()5_A^$^9v9N{ @Bd console.log('')5_A^$^9v9N{9@A console.log('<<<')5_E]$]9v9N{?EGd EGc5_F^$^9v9N{BEGd console.log()5_F^$^9v9N{CEGd console.log('')5_F^$^9v9N{^EF console.log('>')5_L]$]9v9N{`LNd LNc5_M^$^9v9N{cLNd console.log()5_M^$^9v9N{cLNd console.log('')5_M^$^9v9N{sLNd console.log('>')5_H^$^9v9N{GId else if (done) done()5_I^$^9v9N{HI else logger.report()5_E]$]9v9N{DFc function next(done) {5_H ]$]9v9N{GIc else done()5_EEIvN{DFc function next() { var unit = units.shift()> if (unit) Unit(unit.name, unit.unit, logger, Assert)(next) done() }5_IEEvN{IO` IK_5_HEEvN{GH console.log('>', done)5_JEEvN{IKc var unit = units.shift()5_KEEvN{JLc> if (unit) Unit(unit.name, unit.unit, logger, Assert)(next)5_LEEvN|KMc done()5_MEEvN|LNc }5_N EEvN| MOc next(done)5_EEEvN|DE 5_EEEvN|DE5_JEEvN|2IKa done()5_J EEvN|4IKa els done()5_ EEvN|baL/*jshint asi: true newcap: true undef: true es5: true node: true devel: true5_EEvN|ma forin: false */5_AEEvN|@Ba@ units = Object.keys(units).filter(isTest).map(function(name) {5_A EEvN|@BaJ var names units = Object.keys(units).filter(isTest).map(function(name) {5_AEEvN|@BaL var names = units = Object.keys(units).filter(isTest).map(function(name) {5_A/EEvN|@CaD var names = Object.keys(units).filter(isTest).map(function(name) {5_BFFvN|AB .map(function(name) {5_BEEvN|AB, return { name: name, unit: units[name] }5_BDDvN|AB })5_BCCvN|AB5_ABBvN|AC^5_FCCvN|EG_ var unit = units.shift()5_FCCvN|EG_ var name = units.shift()5_GCCvN|FH_@ if (unit) Unit(unit.name, unit.unit, logger, Assert)(next)5_GCCvN|FH_@ if (name) Unit(unit.name, unit.unit, logger, Assert)(next)5_G$CCvN|FH_; if (name) Unit(name, unit.unit, logger, Assert)(next)5_G CCvN|FH_8 if (name) Unit(name, unit[], logger, Assert)(next)5_GCCvN|FH_< if (name) Unit(name, unit[name], logger, Assert)(next)5_???:v:N|>@_;function isTest(name) { return 0 === name.indexOf('test') }5_???:v:N|>?5_@.??:v:N|?A^/ var names = Object.keys(units).filter(isTest)5_@@??:v:N|?B^d var names = Object.keys(units).filter(function isTest(name) { return 0 === name.indexOf('test') })5_A&??:v:N|@C_( return 0 === name.indexOf('test') })5_Z<??:v:N}1Y[`@ Unit('Running all tests:', units, logger, Assert)(function() {5_??:v:N}L`; * Test constructor. Wrapper of the CommonJS test function.5_??:v:N}[` * Creates a test function.5_3??:v:N}d23 * @param {Object} options5_3>>:v:N}d23 * Options with keys:5_3==:v:N}d23 * @param {Object} tests5_3<<:v:N}e23< * List of test functions / sublists of test functions.5_3;;:v:N}e23 * @param {Log} log5_3:::v:N}e23K * Logger for this Suite. If this is sub-suite logger provided will be5_399:v:N}e236 * smart enough to indent results for this suite.5_ 388:v:N}f23 * @param {Assert} Assert5_  377:v:N}f23K * Assertions constructor. Constructor is used to construct individual5_   366:v:N}f23 * assert objects per test.5_   155:v:N}i02VM * Test suite / group constructor. All the tests in the suite can be executed5_   155:v:N}l02VU * Creates Test suite / group constructor. All the tests in the suite can be executed5_  1+55:v:N}p02VW * Creates a test suite / group constructor. All the tests in the suite can be executed5_ 1$55:v:N}w02VK * Creates a test suite / group. All the tests in the suite can be executed5_1255:v:N}{02VO * Creates a test suite / group. Calling the tests in the suite can be executed5_1B55:v:N}02VN * Creates a test suite / group. Calling returned in the suite can be executed5_1F55:v:N}02VF * Creates a test suite / group. Calling returned function be executed5_2055:v:N}13V0 * by calling `run` method on returned instance.5_455:v:N}345_244:v:N}13U * all test in the given unit.5_=044:v:N}<>U= if (name) Unit(name, units[name], logger, Assert)(next)5_:: :vN}9;U! logger = logger.section(name)5_:: :vN}9: 5_:: :vN}9;T function next() {5_>: :vN}=?T }5_>: :vN}=?T })()5_?: :vN}>? next()5_4,: :vN~46T 46S5_5; ;vN~?46 // Propreties that 5_5; ;vN~B46T // Properties that 5_ 5; ;vN~Q46T7 // Properties that represent test functions or suits.5_! 5; ;vN~U46TB // Collecting Properties that represent test functions or suits.5_ "!9; ;vN~Y8;T5_!#":< <vN~9;U // subsuits.5_"$#;< <vN~;=V ;=U5_#%$<== =vN~;=V= // Chaining test / suits so that each is executed after p5_$&%K= =vN~JLV * Runs passed tests.5_%'&M= =vN~LM5_&('#= =vN"$U unit(assert, done)5_')(#= =vN(#%V #%U5_(*)$ > >vN/#%V if ()5_)+*$> >vN5#%V if (typeof result )5_*,+$> >vN7#%V if (typeof(result )5_+-,$> >vN;#%V! if (typeof(result) === '' )5_,.-$&> >vN>#%V' if (typeof(result) === 'object' )5_-/.$> >vNF#%V! if (result && result.then )5_.0/$&> >vNI#%V( if (result && typeof(result.then )5_/10$-> >vNL#%V0 if (result && typeof(result.then) === '' )5_021$7> >vNN#%V8 if (result && typeof(result.then) === 'function' )5_132$5> >vNO$&W $&V5_243%? ?vNU$&W result.then()5_354%? ?vNX$&W result.then(function())5_465% ? ?vNX$'W" result.then(function() {})5_576%@ @vNd$&X result.then(function() {5_687%"@ @vNg%'Y %'X5_798&A AvNl%'Y logger.passed()5_8:9&A AvNl%'Y logger.passed('')5_9;:' A AvNp&(Y })5_:<;'A AvNz&(Y }, function failed())5_;=<'A AvN{&)Y }, function failed() {})5_<>='B BvN}&(Z }, function failed() {5_=?>' B BvN')[ ')Z5_>@?&C CvN%'[! logger.passed('passed')5_?A@(C CvN')[ logger.5_@BA(C CvN')[ logger.fail()5_ACB$7C CvN#%[7 if (result && typeof(result.then) === 'function')5_BDC$:C CvN#%[: if (result && typeof(result.then) === 'function') {}5_CED) C CvN)+\ )+[5_DFE*D DvN)+\ }5_EGF+D DvN)+\ } else %if (isFailFast) logger.pass('passed')*,\+ if (isFailFast) logger.pass('passed')5_FHG* C CvN),[2 } else if (isFailFast) logger.pass('passed')5_GIH,D DvN+-\ if (isSync) done()5_HJI,D DvN,.] ,.\5_IKJ#E EvN#%^ #%]5_JLK$F FvN#%^ // Support for promises.5_KML$!F FvN#%2 // If it's async test that returs a promise.5_LNM'F FvN')_ ')^5_MON+ G GvN+-_5_NPO,H HvN+,5_OQP*G GvN*,` *,_5_PRQ2Nd12 console.trace(exception)5_QSRXXX v NNWY_! logger = logger || new Logger()5_RTSXXX v NNWX 5_SUT  'vN ^'var Logger = require('./logger').Logger5_TVU  'vN 5_UV  'vN  // constancts5_EEEvN{DJc 5_EEEvN{DF5_EEEvN{DF5_FEEvN{EG5_FEEvN{FG\ FH] logger || new Logger()5_MvNzLN5_ B,BRvRNw` logg = logger.section(name)5_B,BRvRNw` log = logger.section(name)5_AA,ARvRNt@B_, return { name: name, test: units[name] }5_FA,ARvRNtEG_3 if (unit) Unit(unit.unit, logger, Assert)(next)5_@FA A1v1NrD?A[+ units = Object.keys(units).filter(isTest)5_A A A1v1NrO@B[ return 5_AA A1v1NrS@B5_AA A1v1NrT@B5_AA A1v1Nr[@BY function next()5_AA A1v1Nrb@BY function next() {}5_AA A1v1Nrb@BY function next() { }5_AFFvNrcABZ AC[+ Unit(name, units[name], logger, Assert)5_FFFvNrlEG[ 5_AHHvNrnAB[ AC\ var unit = units.shift()5_BIIvNryBC\ BD] if (unit) unit(suite)5_7@ @1v1NrO685_hjiDJ J#v#NgCE5_acgbKL L#v#N3bJL[0 console.log(name, typeof(unit) === 'function')5_bdcK/L L#v#N;cJL[! console.log(name, typeof(unit))5_cedKL L#v#NFJL[! console.log(name, typeof unit))5_dfeK L L#v#NHdJL[ console.log(name, typeof unit)5_efKL L#v#NReJL[! console.log(name, typeof units)5_SUWTK K#v#NY Z console.log()5_TVUK K#v#NZ console.log('')5_UVK K#v#N[Z console.log('>>>>>>')5_QSR?!K K#v#NTX>@Z2 console.log(name, typeof(unit) === 'function')5_A++vN^@B return function suite() {5_A++vNf@B return function suite(next) {5_<*<JvJNb if (isDone) logger.error(new Error(ERR_COMPLETED_COMPLETE)new Error(ERR_COMPLETED_COMPLETE))5_Y$vNs  function next()5_vN؎ function continueation()5_vNء function go()5_vNإ function go() {}5_ vNئ function go() { }5_! vNب }5_ "! vNة5_!#"vNح5_"$#vNز Object.keys(units).5_#%$vNش# var names = Object.keys(units).5_$&%#vNط" var names = Object.keys(units)5_%'&vNع 5_&('vN var name = names.shift()5_')(vN  if ()5_(*) vN if (!name)5_)+*vN if (!name) return false5_*,+ #v#N  if ()5_+-,  #v#N% if (0 !== name.indexOf('test'))5_,.-% #v#N1 if (0 !== name.indexOf('test')) return go()5_-/./ #v#N 5_.0/ #v#N function get() {5_/10:v:N 5_021:v:N#& if ('function' === typeof(unit))> Test(name, unit, logger, units.Assert || Assert)(next) else; Suite(unit, logger.section(name), Assert || Assert)5_132>:v:N'8 Test(name, unit, logger, units.Assert || Assert)5_243&:v:N+ ! Assert = units.Assert || Assert5_354':v:N88 Test(name, unit, logger, Assert || Assert)(next)5_4651:v:N:. Test(name, unit, logger, Assert)(next)5_576::v:N>1 Suite(unit, logger.section(name), Assert)5_6874:v:NF1 Suite(unit, logger.section(name), Assert)5_7981:v:NI( Test(name, unit, logger, Assert)5_8:9:v:NS function Unitfunction Unit()5_9;::v:NYfunction Unit() {}5_:<;:v:NZfunction Unit() {}5_;=<:v:N\+function Unit(name, unit, logger, Assert) {5_<>='1vNr   if5_=?>7vN{  })5_>@? 7vN} })5_?A@7vNـ" if ('function' === typeof(unit)). Test(name, unit, logger, Assert)(next) else1 Suite(unit, logger.section(name), Assert)5_@BA7vNه % return 'function' === typeof(unit))5_ACB%7vNى & return 'function' === typeof(unit) ?5_BDC7vNٌ &Test(name, unit, logger, Assert)(next) M return 'function' === typeof(unit) ? Test(name, unit, logger, Assert)(next)5_CED7vNٕ5_DFE7vNٖ6P : Suite(unit, logger.section(name), Assert)5_EGF7vN٨75_FHG7vNٯ  return Unit()5_GIH7vNٷ return Unit(unit)5_HJI7vNٺ return Unit(units[])5_IKJ7vNٻ return Unit(units[name])5_JLK7vN5_KML7vN5_LNM7vN5_MON7vN5_NPO7vN5_OQP7vN5_PRQ7vN5_QSR7vN5_RTS7vN }5_SUT7vN  get()5_TVU 7vN get()()5_UWV 7vN get()(function())5_VXW7vN get()(function() {})5_WX7vN get()(function() { })5_vN؂5_vN؆ function next() 5_7vN8 test(name, unit, logger, units.Assert || Assert)5_ vN8 Test(name, unit, logger, units.Assert || Assert)5_8vN: Test(name, unit, logger, units.Assert || Assert)()5_9vN> Test(name, unit, logger, units.Assert || Assert)(next)5_&vN ! Assert = Assert || units.Assert5_$vNfunction Suite(units, logger) {5_:vN) Suite(unit, logger.section(name))5_(vN 1 Suite(unit, logger.section(name), Assert)5_vN''function Suite(units, logger, Assert) {5_ 1vN-4. Test(name, unit, logger, Assert)(next)5_  1vNw3 Suite(unit, logger.section(name), Assert)()5_   2vNz7 Suite(unit, logger.section(name), Assert)(next)5_   .vNג( Test(name, unit, logger, Assert)5_  vNז- next(Test(name, unit, logger, Assert)5_ -vNי. next(Test(name, unit, logger, Assert))5_7vNכ1 Suite(unit, logger.section(name), Assert)5_vNם6 next(Suite(unit, logger.section(name), Assert)5_6vNנ7 next(Suite(unit, logger.section(name), Assert))5_vNפ5  stop()5_vN׫5_vN?function units5_vNF5_ .vNM( Test(name, unit, logger, Assert)5_ vNO- next(Test(name, unit, logger, Assert)5_ -vNR. next(Test(name, unit, logger, Assert))5_ %vN ? Suite(name, unit, logger.section(name), Assert || Assert)5_(v(Nզ8 test(unit, logger.section, units.Assert || Assert)5_xzvM$ +log.print('Passed:' + suite.passes.length + F if (suite.mute) return log.print('Passed:' + suite.passes.length +5_xzvM !  if (suite.mute) return null5_ xzvM"  5_]^`_$xzvM## if (0 !== name.indexOf('test')) continue5_]_^,xzvM#1 if (0 !== name.indexOf('test')) continue null5_=?>nvM mo! utit = this.unit sync = ut5_**vM ,J ERR_COMPLETED_COMPLETE = 'Attemt to complete test more then one times',5