Skip to content

Commit

Permalink
Fixed Node module path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas C. Zakas authored and Nicholas committed Dec 8, 2011
1 parent 940897c commit f4a6095
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 236 deletions.
9 changes: 1 addition & 8 deletions javascript/build/yuitest/npm/cli.js
Expand Up @@ -118,7 +118,7 @@ YUITest.CLI = {
}
} else {
try {
require(files[i]);
require(path.resolve(process.cwd(), files[i]));
} catch (ex) {
this.warn("[ERROR] " + ex.stack);
this.warn("\n[ERROR] No tests loaded from " + files[i] + ". If you're not using CommonJS module format, try running with --webcompat option.\n");
Expand All @@ -137,7 +137,6 @@ YUITest.CLI = {




/**
* Console output that mimics logger output from YUI Test for YUI 2/3.
* @namespace YUITest.Node.CLI
Expand Down Expand Up @@ -233,7 +232,6 @@ YUITest.CLI.Logger = function(){
};



/**
* Console output that mimics XUnit output.
* @namespace YUITest.CLI
Expand Down Expand Up @@ -373,7 +371,6 @@ YUITest.CLI.XUnit = function(){
};



/**
* Console output that uses TestFormat formats.
* @namespace YUITest.Node.CLI
Expand All @@ -396,7 +393,6 @@ YUITest.CLI.Format = function(format){
testRunner.subscribe(testRunner.COMPLETE_EVENT, handleEvent);

};

/*
* Augments the environment-specific CLI API with common functionality.
*/
Expand Down Expand Up @@ -494,6 +490,3 @@ YUITest.Util.mix(YUITest.CLI, {
});

YUITest.CLI.start();



22 changes: 0 additions & 22 deletions javascript/build/yuitest/npm/lib/yuitest.js
Expand Up @@ -15,7 +15,6 @@ YUITest.version = "@VERSION@";
//backwards compatibility
exports.YUITest = YUITest;


/**
* Simple custom event implementation.
* @namespace YUITest
Expand Down Expand Up @@ -131,7 +130,6 @@ YUITest.EventTarget.prototype = {

};


/**
* Object containing helper methods.
* @namespace YUITest
Expand Down Expand Up @@ -180,7 +178,6 @@ YUITest.Util = {
};



/**
* Object containing object helper methods.
* @namespace YUITest
Expand Down Expand Up @@ -286,7 +283,6 @@ YUITest.Object = {
return keys;
}
};

/**
* Error is thrown whenever an assertion fails. It provides methods
* to more easily get at error information and also provides a base class
Expand Down Expand Up @@ -339,7 +335,6 @@ YUITest.AssertionError.prototype = {
}

};

/**
* ComparisonFailure is subclass of Error that is thrown whenever
* a comparison between two values fails. It provides mechanisms to retrieve
Expand Down Expand Up @@ -397,7 +392,6 @@ YUITest.ComparisonFailure.prototype.getMessage = function(){
return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" +
"\nActual: " + this.actual + " (" + (typeof this.actual) + ")";
};

/**
* ShouldError is subclass of Error that is thrown whenever
* a test is expected to throw an error but doesn't.
Expand Down Expand Up @@ -427,7 +421,6 @@ YUITest.ShouldError.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.ShouldError.prototype.constructor = YUITest.ShouldError;

/**
* ShouldFail is subclass of AssertionError that is thrown whenever
* a test was expected to fail but did not.
Expand Down Expand Up @@ -457,7 +450,6 @@ YUITest.ShouldFail.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;

/**
* UnexpectedError is subclass of AssertionError that is thrown whenever
* an error occurs within the course of a test and the test was not expected
Expand Down Expand Up @@ -503,7 +495,6 @@ YUITest.UnexpectedError.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.UnexpectedError.prototype.constructor = YUITest.UnexpectedError;

/**
* UnexpectedValue is subclass of Error that is thrown whenever
* a value was unexpected in its scope. This typically means that a test
Expand Down Expand Up @@ -554,7 +545,6 @@ YUITest.UnexpectedValue.prototype.getMessage = function(){
return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") ";
};


/**
* Represents a stoppage in test execution to wait for an amount of time before
* continuing.
Expand All @@ -581,7 +571,6 @@ YUITest.Wait = function (segment, delay) {
*/
this.delay = (typeof delay == "number" ? delay : 0);
};


/**
* The Assert object provides functions to test JavaScript values against
Expand Down Expand Up @@ -1064,7 +1053,6 @@ YUITest.Assert = {

};


/**
* The ArrayAssert object provides functions to test JavaScript array objects
* for a variety of cases.
Expand Down Expand Up @@ -1440,7 +1428,6 @@ YUITest.ArrayAssert = {

};


/**
* The ObjectAssert object provides functions to test JavaScript objects
* for a variety of cases.
Expand Down Expand Up @@ -1628,7 +1615,6 @@ YUITest.ObjectAssert = {
};



/**
* The DateAssert object provides functions to test JavaScript Date objects
* for a variety of cases.
Expand Down Expand Up @@ -1712,7 +1698,6 @@ YUITest.DateAssert = {
}

};

/**
* Creates a new mock object.
* @namespace YUITest
Expand Down Expand Up @@ -1935,7 +1920,6 @@ YUITest.Mock.Value.Object = YUITest.Mock.Value(YUITest.Assert.isObject);
* @type Function
*/
YUITest.Mock.Value.Function = YUITest.Mock.Value(YUITest.Assert.isFunction);

/**
* Convenience type for storing and aggregating
* test result information.
Expand Down Expand Up @@ -2010,7 +1994,6 @@ YUITest.Results.prototype.include = function(results){
this.total += results.total;
this.errors += results.errors;
};

/**
* Test case containing various tests to run.
* @param template An object containing any number of test methods, other methods,
Expand Down Expand Up @@ -2157,7 +2140,6 @@ YUITest.TestCase.prototype = {
}
};



/**
* A test suite that can contain a collection of TestCase and TestSuite objects.
Expand Down Expand Up @@ -2241,7 +2223,6 @@ YUITest.TestSuite.prototype = {
}

};

/**
* An object object containing test result formatting methods.
* @namespace YUITest
Expand Down Expand Up @@ -2485,7 +2466,6 @@ YUITest.TestFormat = function(){

};
}();

/**
* An object object containing coverage result formatting methods.
* @namespace YUITest
Expand Down Expand Up @@ -2529,7 +2509,6 @@ YUITest.CoverageFormat = {
}

};


/**
* Runs test suites and test cases, providing events to allowing for the
Expand Down Expand Up @@ -3533,4 +3512,3 @@ YUITest.CoverageFormat = {
return new TestRunner();

}();

22 changes: 0 additions & 22 deletions javascript/build/yuitest/yuitest-core-debug.js
Expand Up @@ -13,7 +13,6 @@ var YUITest = {
version: "@VERSION@"
};


/**
* Simple custom event implementation.
* @namespace YUITest
Expand Down Expand Up @@ -129,7 +128,6 @@ YUITest.EventTarget.prototype = {

};


/**
* Object containing helper methods.
* @namespace YUITest
Expand Down Expand Up @@ -178,7 +176,6 @@ YUITest.Util = {
};



/**
* Object containing object helper methods.
* @namespace YUITest
Expand Down Expand Up @@ -284,7 +281,6 @@ YUITest.Object = {
return keys;
}
};

/**
* Error is thrown whenever an assertion fails. It provides methods
* to more easily get at error information and also provides a base class
Expand Down Expand Up @@ -337,7 +333,6 @@ YUITest.AssertionError.prototype = {
}

};

/**
* ComparisonFailure is subclass of Error that is thrown whenever
* a comparison between two values fails. It provides mechanisms to retrieve
Expand Down Expand Up @@ -395,7 +390,6 @@ YUITest.ComparisonFailure.prototype.getMessage = function(){
return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" +
"\nActual: " + this.actual + " (" + (typeof this.actual) + ")";
};

/**
* ShouldError is subclass of Error that is thrown whenever
* a test is expected to throw an error but doesn't.
Expand Down Expand Up @@ -425,7 +419,6 @@ YUITest.ShouldError.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.ShouldError.prototype.constructor = YUITest.ShouldError;

/**
* ShouldFail is subclass of AssertionError that is thrown whenever
* a test was expected to fail but did not.
Expand Down Expand Up @@ -455,7 +448,6 @@ YUITest.ShouldFail.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;

/**
* UnexpectedError is subclass of AssertionError that is thrown whenever
* an error occurs within the course of a test and the test was not expected
Expand Down Expand Up @@ -501,7 +493,6 @@ YUITest.UnexpectedError.prototype = new YUITest.AssertionError();

//restore constructor
YUITest.UnexpectedError.prototype.constructor = YUITest.UnexpectedError;

/**
* UnexpectedValue is subclass of Error that is thrown whenever
* a value was unexpected in its scope. This typically means that a test
Expand Down Expand Up @@ -552,7 +543,6 @@ YUITest.UnexpectedValue.prototype.getMessage = function(){
return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") ";
};


/**
* Represents a stoppage in test execution to wait for an amount of time before
* continuing.
Expand All @@ -579,7 +569,6 @@ YUITest.Wait = function (segment, delay) {
*/
this.delay = (typeof delay == "number" ? delay : 0);
};


/**
* The Assert object provides functions to test JavaScript values against
Expand Down Expand Up @@ -1062,7 +1051,6 @@ YUITest.Assert = {

};


/**
* The ArrayAssert object provides functions to test JavaScript array objects
* for a variety of cases.
Expand Down Expand Up @@ -1438,7 +1426,6 @@ YUITest.ArrayAssert = {

};


/**
* The ObjectAssert object provides functions to test JavaScript objects
* for a variety of cases.
Expand Down Expand Up @@ -1626,7 +1613,6 @@ YUITest.ObjectAssert = {
};



/**
* The DateAssert object provides functions to test JavaScript Date objects
* for a variety of cases.
Expand Down Expand Up @@ -1710,7 +1696,6 @@ YUITest.DateAssert = {
}

};

/**
* Creates a new mock object.
* @namespace YUITest
Expand Down Expand Up @@ -1933,7 +1918,6 @@ YUITest.Mock.Value.Object = YUITest.Mock.Value(YUITest.Assert.isObject);
* @type Function
*/
YUITest.Mock.Value.Function = YUITest.Mock.Value(YUITest.Assert.isFunction);

/**
* Convenience type for storing and aggregating
* test result information.
Expand Down Expand Up @@ -2008,7 +1992,6 @@ YUITest.Results.prototype.include = function(results){
this.total += results.total;
this.errors += results.errors;
};

/**
* Test case containing various tests to run.
* @param template An object containing any number of test methods, other methods,
Expand Down Expand Up @@ -2155,7 +2138,6 @@ YUITest.TestCase.prototype = {
}
};



/**
* A test suite that can contain a collection of TestCase and TestSuite objects.
Expand Down Expand Up @@ -2239,7 +2221,6 @@ YUITest.TestSuite.prototype = {
}

};

/**
* An object object containing test result formatting methods.
* @namespace YUITest
Expand Down Expand Up @@ -2483,7 +2464,6 @@ YUITest.TestFormat = function(){

};
}();

/**
* An object object containing coverage result formatting methods.
* @namespace YUITest
Expand Down Expand Up @@ -2527,7 +2507,6 @@ YUITest.CoverageFormat = {
}

};


/**
* Runs test suites and test cases, providing events to allowing for the
Expand Down Expand Up @@ -3531,4 +3510,3 @@ YUITest.CoverageFormat = {
return new TestRunner();

}();

0 comments on commit f4a6095

Please sign in to comment.