VimUnDo s@\Cp)ta-Jp!Ӵ+HڭuM Moh_ vM "6ModuleTest.prototype.requires = function(path, name) {5ModuleTest.prototype._fakeModuleSystem = function() {.ModuleTest.prototype.getExports = function() { +ModuleTest.prototype.compile = function() { module.exports = ModuleTest; "oop.extend(ModuleTest, MicroTest);!function ModuleTest(properties) {5_ v M) MicroTest.prototype.compile.call(this); &oop.extend(ModuleTestCase, MicroTest); MicroTest.call(this);(var MicroTest = require('./micro_test');5_ v M*'var TestCase = require('./micro_test');5_ v Mx+ *5_ v M| context.console = console;5_ v M} *5_ v M} +5_   v M~"- !,5_  v M!.L // The only real node.js object we make available to our test sandboxes is5_ ! v M ! // the cons5_  v M!- // 5_ / v M!-/ // Make the console available for convenience5_  / v M!-H // Make the console available for convenience, this is the only real n5_ $-VM. -5_&/VM this.required = {};5_&/VM̉ //this.required = {};5_&&/VM̕&)0 &(/5_'&1VM̕&(15_)&1VM̙(*1) var exports = this.class(name || path);5_)&1VM̥(*1! var exports = this.class(name);5_0 &1VM̧/11 return exports;5_.&1VM̩-/1 .andReturn(exports);5_)&1VM̬)+2 )+15_ M63 25_1Mɓ015_1Mɓ 01 return value;5_#Mʞ#%15_$Mʟ #$5_ #M#%2 #%15_! $M#%2 context._5_ "!$ M #%2 context._5_!#"$M#$ context._filename5_"$#$M$&15_#%$#M"$2/ // Make the console available for convenience5_$&%#M"$2 // Inject a few "real" things5_%'&#M"$2( // Inject a selected few "real" things5_&('#M"$2, // Inject a few selected few "real" things5_')(#M"$2( // Inject a few selected "real" things5_(*)#M"$2' // Inject a few selected real" things5_)+*#(M"$2( // Inject a few selected "real" things5_*,+%M$&2 context._filename5_+-,% M%'25_,.-& M%'3! context._filename = this._path;5_-/.% M$&3! context._filename = this._path;5_.0/M 35_/10M 4var oop = require('oop');5_021M4var path = require('oop');5_132'M&(4! context.__dirname = this._path;5_243'-M &(4. context.__dirname = path.dirname(this._path;5_354!Mj !$5 !#45_465#MΖ#%7#%65_586%MΞ$%3 this.fakeFunction(context, 'require', 'require');5_69783M246, .expectAnytime(this._context, 'require')5_8:93M246# .expectAnytime(context.require)5_9;:#)v)M#"#5_:<;)v)Ms6 55_;=<)v)Mt75_<>=)v)Mw if (context5_=?>)v)Mx5_>@?)v)Mx6 55_?A@)v)Mx 75_@BA)v)M|95_ACB/ )v)Mρ/2: /195_BDC0)v)Mς/1;5_CED0)v)Mτ/1< /1;5_DFE0)v)Mϊ/0 // Maybe 5_EGF4)v)MϠ56<46< 46;5_FHG555vMϠ46< console.error(var);5_GIH555vMϷ46< console.error(value);5_HKI555vMϽ45 console.error(value+'');5_ILJK455vM56<46< 46;5_KML555vM46< console.error(var);5_LPM555vM45 console.error(value);5_MQNP055vMr04< 02;5_PRQ288vMz13>5_QVR288vMؐ13> path.forEach(this.requires);5_RWSV2$88vM24? 24>5_VXW2$99vM 13?' path.forEach(this.requires.bind());5_WYX299vM15?+ path.forEach(this.requires.bind(this));5_XZY3;;vM23 5_Y[Z2::vM!24@5_Z\[3;;vM24A5_[]\2;;vM13A path.forEach(function() {5_\^]3;;vM34A24A 5_]_^333vM"24A console.error(var);5_^`_333vM23 console.error(args);5__a`233vM#24A 24@5_`ga3/44vM&24A0 this.requires.apply(this, [].concat(args);5_aheg244vM&13B 13A5_gih255vM:'12- // Shortcut for multiple calls, one array5_hji144vM;03B 02A5_ikj266vMH13C* // Handle shortcut to ['sys', './fs', []5_jlk266vMJ13C+ // Handle shortcut to ['path', './fs', []5_kml266vMP13C) // Handle shortcut: ['path', './fs', []5_lnm2966vMV13C: // Handle shortcut: ['path', ['events', 'EventEmitter']]5_mon2<66vMW13C> // Handle shortcut: ['path', ['events', 'EventEmitter'], '']5_npo2<66vMY13CA // Handle shortcut: ['path', ['events', 'EventEmitter'], 'str']5_oqp2C66vM[13CC // Handle shortcut: ['path', ['events', 'EventEmitter'], './str']5_prq2 66vMb13CC // Handle shortcut: ['path', ['events', 'EventEmitter'], './str']5_qsr066vMf/0 this._fakeModuleSystem();5_rts755vMh79B5_sut855vMh79C5_tvu055vMj)/05_uwv44vMGF*?A) .expectAnytime(this._context.require) var context = this._context;& return this._context.module.exports;5_vxw/744vMH.0C:ModuleTestCase.prototype.requires = function(path, name) {5_wyx<44vMH;=C5_xzy<44vMH;<5_y{z<44vMH;=C5_z|{<44vMH;<5_{}|<44vMH;=C5_|~}<44vMH;<5_}~<44vMH<>D <>C5_~=44vMH<= if (5_<44vMH;=D ;=C5_<44vMH;< var value 5_<44vMH;?D ;=C5_<44vMH;=F if (namedExport) {5_?44vMH>? var value = this.class(name);5_>44vMH=?E5_=44vMH<=5_=44vMH<>E var value = this.class(name);5_>44vMH=AE }5_?44vMH>@G5_<44vMH;< if (!namedExport) {5_?44vMH?AF5_<44vMH;=G! var value = this.class(name);5_=44vMH<= } else {5_=44vMH<= var value = {};5_=44vMH<= }5_=44vMH<@D if (!namedExport) {5_>44vMH=?F5_=44vMH+<>F if (!namedExport) {5_>44vMH=?F value[name] = value;5_>44vMH,=?F value[name] = thisvalue;5_<44vMI;< var value = this.class(name);5_<44vMI<>E5_=44vMI<>F var value = this.class(name);5_=44vMI <>F! var value = this.class(name);5_?44vMI >BF }5_@44vMI@BH5_@44vMI?@5_=44vMI-<>H! var value = this.class(path);5_@44vMI.?AH! var value = this.class(path);5_B44vMI/ACH5_C44vMIBC this.required[name] = value;5_@44vMI@BH5_A44vMI@BI this.required[name] = value;5_>44vMI>@I5_?44vMI>@J this.required[name] = value;5_?44vMI>@J this.required[name] = value;5_=44vMI<>J$ var value = this.function(path);5_=44vMI<>J var value = {};5_=44vMI<>J var value = };5_=44vMI<>J var value = ;5_=44vMI<>J var value = this.object();5_?44vMI0>@J this.required[name] = value;5_D44vMJ.1CD5_FMk2EGI( .expectAnytime(this.context.require)5_'Mk3')J ')I5_( Mk:')J this.stub();5_(Mk?'( this.stub('');5_'Mk@3')J ')I5_(MkP4')K ')J5_(MkZ5'(, // Questionable, should this be done here?5_('(VMkk(+J5_('(VMkm') this.stub(context.require);&(- context.require = this.function('require');5_*'(VMkn)* this.stub(context.require);5_)'(VMkp6(*K- context.require = this.function('require');5_)'(VMk()) context.require = this.stub('require');5_('(VMk7') //this.stub(context.require);&(/ //context.require = this.function('require');5_03'(VMl8/1JGModuleTestCase.prototype.requires = function(path, name, namedExport) {5_828VMlb97968 }57 return;46 }.bind(this));351 this.requires.apply(this, [].concat(args));24! path.forEach(function(args) {13 if (path instanceof Array) {5_;28VMl:; name = name || path;5_:28VMl:<J:<I5_;28VMl:; 5_;28VMl::;5_928VMl9<I 9;H5_;28VMl:<K :<J5_<28VMl<>L <>K5_=28VMl<= ex5_<28VMl;=K var exports = options.exports;5_<)28VMl;=K* var exports = [].concat(options.exports;5_;28VMl;>L ;=K5_>28VMl?BN>@N >@M5_A28VMl@BP }5_? 28VMl>@P expors.fprEach(function() {5_@28VMl?@ 5_?28VMl;?AO5_@DFVMl@DP5_@GIVMl<?@5_;FHVMm ;=S ;=R5_=GIVMm=<=5_0FHVMm|>/1R=ModuleTestCase.prototype.requires = function(path, options) {5_0FHVMn*?/1RAModuleTestCase.prototype.injectModule = function(path, options) {5_<FHVMo@;<& options.name = path || options.name;5_(EGVMp5(+Q')Q this.stub(context.require);5_)GIVMp7() 5_(FHVMp7(*R5_)GIVMp:)*S(*S5_)))vMp;A(*S console.log(var);5_9))vMpD9;T 9;S5_:))vMpGB9;T return5_( ))vMqi')T) this.stub(context.require, function() {5_( ))vMqj')T this.stub(, function() {5_( ))vMqk')T this.stub('', function() {5_( ))vMq{C')T# this.stub('require', function() {5_'))vMqD&'- context.require = this.function('require');5_(((vMq'( console.log('not there');5_'((vMqE')R5_')))vMq&(S, this.stub(context, 'require', function() {5_())vMq')S5_)))vMq(*S });5_())vMq'( return 5_'((vMq')S ')R5_())vMq'( var 5_'((vMq')S ')R5_())vMqF')S, this.required[path] = this.object(path);5_1))vMs02SBModuleTestCase.prototype.injectRequire = function(path, options) {5_8))vMs8<T 8:S5_:))vMsG9;V5_1 ))vMt H02V? this._fakeModuleSystem();5_9))vMy`N8:V5_9))vM}B9<X 9;W5_;))vM}E;=Z ;=Y5_<))vM}H;=Z options5_<))vM}K<?Z;=Z [].concat(options5_>))vM}P=?\ }5_=))vM}Q<= 5_ <))vM}R<>[5_  @@AVM}Y?@8 var exports = this.required[path] = this.object(path);6 this.stub(this.context, 'require', [path], exports);5_   >@@VM}Z=@Z5_   =BBVM}[<=5_   ==>VM}\<?[8 var exports = this.required[path] = this.object(path);6 this.stub(this.context, 'require', [path], exports);5_  ; =>VM}c:<[ options = options || {};5_ ;#=>VM}g:<[$ options = [].concat(options || {};5_;=>VM}j:<[% options = [].concat(options || {});5_<=>VM}r;=[) [].concat(options).forEach(function() {5_<=>VM}r;=[& concat(options).forEach(function() {5_<=>VM}r;=[ (options).forEach(function() {5_<=>VM}r;=[ options).forEach(function() {5_<=>VM}s;=[ ).forEach(function() {5_<=>VM}s;=[ forEach(function() {5_; =>VM}:<[) var exports = [].concat(options || {});5_<<<vM};=[ exports.forEach(function() {5_A<<vM}@A5_B<<vM}OAB5_<<<vM}<?Z <>Y5_<!<<vM};=[$ exportObjects.forEach(function() {5_=<<vM}<>[5_=3<<vM}<>[4 object.name = object.name || object.constructor;5_=:<<vM}=@\ =?[5_ ?<<vM}>?5_! ?<<vM}>?5_ "!@<<vM}?@8 this.stub(this.context, 'require', [path], exports);5_!#"A<<vM}ACZ5_"$#B<<vM}AC[8 this.stub(this.context, 'require', [path], exports);5_#%$;<<vM};>\ ;=[5_$&%<>>vM};=]5_%'&;>>vM~:<]/ var exportObjects = [].concat(options || {});5_&('13>>vM~02]=ModuleTestCase.prototype.requires = function(path, options) {5_')(;>>vM~ :<]) var objects = [].concat(options || {});5_(*)>>>vM~=?]* exportObjects.forEach(function(object) {5_)+*?>>vM~?D^ ?A]5_*,+A>>vM~/P@Ba if (object.constructor) {5_+-,A>>vM~U@A if (object.constructor) {5_,.-A>>vM~U@A5_-/.A>>vM~U@A }5_.0/B>>vM~VAC: var exports = this.required[path] = this.object(path);5_/10A>>vM~WAC^5_021A>>vM~XAB_@B_5_132AAAvM~XQ@B_ console.log(var);5_243;AAvM~aR:<_% objects = [].concat(options || {});5_354;AAvM~<=`;=` ;=_5_465<<<vM~S;=` console.log(var);5_5<6<<<vM~V;< console.log(objects);5_6=8<?(<<vM~W>@_< object.name = object.name || object.constructor || path;5_<>=A<<vM~@A console.log(object);5_=?>?<<vM?B_ ?A^5_>@?A<<vM@A var class = 5_?A@@<<vM@B`@B_5_@BAA<<vM@B` if (this.class5_ACBA<<vM@D` if (object.class5_BDCB<<vMACb5_CED@<<vM@Cc@Bb5_DFEA<<vM@Bd5_EGFD<<vM€CEd 5_FHGI<<vM€ HJd });5_GIHD<<vM€CEd value = 5_HJID<<vM€CEd value = this.class();5_IKJE<<vM€*DHd }5_JLKF<<vM€,EGf5_KMLA<<vM€8@Bf var value;5_LNMA<<vM€9@Bf var value = 5_MONA<<vM€9@Be var value =  if (object.class) {5_NPOA<<vM€;@Bd# var value = if (object.class) {5_OQPA <<vM€<@Bd var value = (object.class) {5_PRQB<<vM€>ACd& value = this.class(object.name);5_QSRB<<vM€?ACd( ? value = this.class(object.name);5_RTSB<<vM€?ACd" ? = this.class(object.name);5_SUTC<<vM€@BC } else {5_TVUC<<vM€ABDc value = this.object(name);5_UWVC<<vM€ABDc = this.object(name);5_VXWC<<vM€BBDc this.object(name);5_WYXD<<vM€CCD }5_XZYB <<vM€DACb ? this.class(object.name);5_Y[ZD<<vM€EDGcDFb5_Z\[E<<vM€FDHd5_[]\F<<vM€ZEGf5_\^]G<<vM€eFJf }5_]_^H<<vM€gGIh5_^`_I<<vM€mILi IKh5__a`L<<vM€vKL5_`baL<<vM€wKL5_acbL<<vM€wKL< //var exports = this.required[path] = this.object(path);5_bdcOObVM€NO return; options = options || {};+ var exports = [].concat(options.exports); expors.forEach(function() {" var value = this.object(path);# value[name] = this.class(name);& this.required[name] = value[name]; }); if (namedExport) {" var value = this.object(path);# value[name] = this.class(name);& this.required[name] = value[name]; } else {! var value = this.class(name); this.required[name] = value; }5_cedOORVM€NPS this .stub(this.context.require)5_dfeOOQVM€NPR" this .stub(this.context.require)5_egfOOQVM€NO! this.stub(this.context.require)5_fhgOOPVM€NO .withArgs(path)5_gihOOOVM€XNO .andReturn(value);5_hjiCOOVM€YBDO : this.object(name);5_ikjNOOVM€NOPMOP MOO5_jmkNNNvM€ZMOP console.log(var);5_knlm;NNvM:<Q :<P5_monFOOvM[EGQ if (objects.length > 1) {5_nqoOPPvMg^NO console.log(exports);5_orpq228VM_12I // Handle this signature: ['path', ['events', 'EventEmitter'], './str'] //if (path instanceof Array) {# //path.forEach(function(args) {3 //this.requires.apply(this, [].concat(args)); //}.bind(this)); //return; //}5_qsrH#'2)V2M‚:GII6 this.stub(this.context, 'require', [path], exports);5_rtsH$'2)V2M‚<`GKI% this.stub(this.context, 'require');5_swtJ'2)V2M‚]bIKK .andReturn(exports);;5_txuwHEBVMocGIK$ this.stub(this.context, 'require')5_wyx%%EBVM%(L %'K5_xzy) GDVM(*M: this.stub(context, 'require', Infinity, function(path) {5_y{z) GDVM(*M3 this.stub(, 'require', Infinity, function(path) {5_z|{) GDVM(*M1 this.stub('require', Infinity, function(path) {5_{}|) GDVM(*M0 this.stub(require', Infinity, function(path) {5_|~}) GDVM(*M) this.stub(', Infinity, function(path) {5_}~)GDVMd(*M8 this.stub(context.required, Infinity, function(path) {5_~JGDVMfIKM- this.expectAnytime(this.context, 'require')5_%M%'M5_& M%'N& context.module = {exports: exports};5_&Mg%'N' context.process = {exports: exports};5_&Mnh%& context.process = {};5_~JGDVMIKHJLw5_tvwuJIJVM‚_HJ //.withArgs(path)IK //.andReturn(exports);5_uvH#IJVM‚aaGIK5 this.stub(this.context, 'require', [path], exports)5_oqpOOOvM]NP8 //this.stub(this.context, 'require', [path], exports);5_kmlENNvM€DFP if () {5_697<8?<<vM~>@_6 object.name = .name || object.constructor || path;5_8:9?<<vM~>@_5 object.name = name || object.constructor || path;5_9;:?<<vM~>@_0 object.name = || object.constructor || path;5_:;?<<vM~U>@_- object.name = object.constructor || path;5_687?<<vM~T>@_ object.name = path;5_>))vM}O=?\5_' ))vMyd&(W8 this.stub(context, 'require', finity, function(path) {5_' ))vMydM&(W0 this.stub(context, 'require', function(path) {5_(Mkh')5_'Mki'(I- context.require = this.function('require');5_?44vMI>@J this.required[name] = value;5_?44vMI>@J this.required[path] = value;5_@44vMH@AG if (!namedExport) {5_afdge444vM35A };5_ef444vM%35A });5_aced444vM35A };5_abdc444vM35A };5_acb444vM35A };5_RUVS2$88vMؒ13>+ path.forEach(this.requires.bind(this));5_STU299vMؿ13> path.forEach(function() { );5_SUT2 88vMإ13>' path.map(this.requires.bind(this));5_MOPN8 55vM(79;% .expectAnytime(this._context, '')5_NO8#55vM)79;, .expectAnytime(this._context, 'require')5_IKJ755vM68; var a = this5_6873M246 .expectAnytime(cont)5_2 Mm133 return this;5_*&1VM̵)+5