Permalink
Browse files

Fixed package.json issue

  • Loading branch information...
1 parent 7fc8528 commit e6ee340affcd4265c98d6a42d0c11dba84564c63 @nzakas committed Jun 14, 2012
@@ -45,7 +45,7 @@ YUITest.CLI = {
//Workaround for https://github.com/joyent/node/issues/1669
var flushed = process.stdout.flush && process.stdout.flush();
- if (!flushed) {
+ if (!flushed && (parseFloat(process.versions.node) < 0.5)) {
process.once("drain", function () {
process.exit(code || 0);
});
@@ -682,7 +682,7 @@ YUITest.Assert = {
/**
* Asserts that a value is equal to another. This uses the double equals sign
- * so type cohersion may occur.
+ * so type coercion may occur.
* @param {Object} expected The expected value.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -698,7 +698,7 @@ YUITest.Assert = {
/**
* Asserts that a value is not equal to another. This uses the double equals sign
- * so type cohersion may occur.
+ * so type coercion may occur.
* @param {Object} unexpected The unexpected value.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -715,7 +715,7 @@ YUITest.Assert = {
/**
* Asserts that a value is not the same as another. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} unexpected The unexpected value.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -731,7 +731,7 @@ YUITest.Assert = {
/**
* Asserts that a value is the same as another. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} expected The expected value.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -751,7 +751,7 @@ YUITest.Assert = {
/**
* Asserts that a value is false. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isFalse
@@ -766,7 +766,7 @@ YUITest.Assert = {
/**
* Asserts that a value is true. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isTrue
@@ -814,7 +814,7 @@ YUITest.Assert = {
/**
* Asserts that a value is not null. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isNotNull
@@ -829,7 +829,7 @@ YUITest.Assert = {
/**
* Asserts that a value is not undefined. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isNotUndefined
@@ -844,7 +844,7 @@ YUITest.Assert = {
/**
* Asserts that a value is null. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isNull
@@ -859,7 +859,7 @@ YUITest.Assert = {
/**
* Asserts that a value is undefined. This uses the triple equals sign
- * so no type cohersion may occur.
+ * so no type coercion may occur.
* @param {Object} actual The actual value to test.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method isUndefined
@@ -1126,7 +1126,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that a value is present in an array. This uses the triple equals
- * sign so no type cohersion may occur.
+ * sign so no type coercion may occur.
* @param {Object} needle The value that is expected in the array.
* @param {Array} haystack An array of values.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -1145,7 +1145,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that a set of values are present in an array. This uses the triple equals
- * sign so no type cohersion may occur. For this assertion to pass, all values must
+ * sign so no type coercion may occur. For this assertion to pass, all values must
* be found.
* @param {Object[]} needles An array of values that are expected in the array.
* @param {Array} haystack An array of values to check.
@@ -1191,7 +1191,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that a value is not present in an array. This uses the triple equals
* Asserts that a value is not present in an array. This uses the triple equals
- * sign so no type cohersion may occur.
+ * sign so no type coercion may occur.
* @param {Object} needle The value that is expected in the array.
* @param {Array} haystack An array of values.
* @param {String} message (Optional) The message to display if the assertion fails.
@@ -1210,7 +1210,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that a set of values are not present in an array. This uses the triple equals
- * sign so no type cohersion may occur. For this assertion to pass, all values must
+ * sign so no type coercion may occur. For this assertion to pass, all values must
* not be found.
* @param {Object[]} needles An array of values that are not expected in the array.
* @param {Array} haystack An array of values to check.
@@ -1257,7 +1257,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that the given value is contained in an array at the specified index.
- * This uses the triple equals sign so no type cohersion will occur.
+ * This uses the triple equals sign so no type coercion will occur.
* @param {Object} needle The value to look for.
* @param {Array} haystack The array to search in.
* @param {int} index The index at which the value should exist.
@@ -1286,7 +1286,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that the values in an array are equal, and in the same position,
* as values in another array. This uses the double equals sign
- * so type cohersion may occur. Note that the array objects themselves
+ * so type coercion may occur. Note that the array objects themselves
* need not be the same for this test to pass.
* @param {Array} expected An array of the expected values.
* @param {Array} actual Any array of the actual values.
@@ -1385,7 +1385,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that the values in an array are the same, and in the same position,
* as values in another array. This uses the triple equals sign
- * so no type cohersion will occur. Note that the array objects themselves
+ * so no type coercion will occur. Note that the array objects themselves
* need not be the same for this test to pass.
* @param {Array} expected An array of the expected values.
* @param {Array} actual Any array of the actual values.
@@ -1414,7 +1414,7 @@ YUITest.ArrayAssert = {
/**
* Asserts that the given value is contained in an array at the specified index,
* starting from the back of the array.
- * This uses the triple equals sign so no type cohersion will occur.
+ * This uses the triple equals sign so no type coercion will occur.
* @param {Object} needle The value to look for.
* @param {Array} haystack The array to search in.
* @param {int} index The index at which the value should exist.
@@ -2021,7 +2021,7 @@ YUITest.Results.prototype.include = function(results){
*/
YUITest.TestCase = function (template) {
- /**
+ /*
* Special rules for the test case. Possible subobjects
* are fail, for tests that should fail, and error, for
* tests that should throw an error.
@@ -2125,6 +2125,7 @@ YUITest.TestCase.prototype = {
/**
* Function to run once before tests start to run.
* This executes before the first call to setUp().
+ * @method init
*/
init: function(){
//noop
@@ -2133,6 +2134,7 @@ YUITest.TestCase.prototype = {
/**
* Function to run once after tests finish running.
* This executes after the last call to tearDown().
+ * @method destroy
*/
destroy: function(){
//noop
@@ -2632,6 +2634,7 @@ YUITest.CoverageFormat = {
* of this node.
* @param {Variant} testObject A TestSuite, TestCase, or the name of a test function.
* @return {Void}
+ * @method appendChild
*/
appendChild : function (testObject){
var node = new TestNode(testObject);
@@ -2742,10 +2745,20 @@ YUITest.CoverageFormat = {
* @static
*/
this._groups = "";
+
}
TestRunner.prototype = YUITest.Util.mix(new YUITest.EventTarget(), {
-
+
+ /**
+ * If true, YUITest will not fire an error for tests with no Asserts.
+ * @prop _ignoreEmpty
+ * @private
+ * @type Boolean
+ * @static
+ */
+ _ignoreEmpty: false,
+
//restore prototype
constructor: YUITest.TestRunner,
@@ -3128,7 +3141,7 @@ YUITest.CoverageFormat = {
segment.call(testCase, this._context);
//if the test hasn't already failed and doesn't have any asserts...
- if(YUITest.Assert._getCount() == 0){
+ if(YUITest.Assert._getCount() == 0 && !this._ignoreEmpty){
throw new YUITest.AssertionError("Test has no asserts.");
}
//if it should fail, and it got here, then it's a fail because it didn't
@@ -3281,11 +3294,11 @@ YUITest.CoverageFormat = {
/**
* Runs a single test based on the data provided in the node.
+ * @method _runTest
* @param {TestNode} node The TestNode representing the test to run.
* @return {Void}
* @static
* @private
- * @name _runTest
*/
_runTest : function (node) {
@@ -3460,6 +3473,7 @@ YUITest.CoverageFormat = {
* as the key name (value is the argument itself).
* @private
* @return {Function} A callback function.
+ * @method callback
*/
callback: function(){
var names = arguments,
@@ -1,10 +1,9 @@
{
"name": "yuitest",
- "version": "0.7.2",
+ "version": "0.7.4",
"description": "YUI Test Library on NodeJS",
"author": "Nicholas C. Zakas <nzakas@yahoo-inc.com>",
"url": { "web" : "http://yuilibrary.com/projects/yuitest/issues" },
- "os": ["darwin", "linux"],
"contributors": [
],
"engines": {
Oops, something went wrong.

0 comments on commit e6ee340

Please sign in to comment.