Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from davglass/master

Submitting here..
  • Loading branch information...
commit b722daf4a2e99d562ee6d5cc4070d0a75c93970c 2 parents 20b688c + 1d06aa5
@nzakas authored
View
2  javascript/src/cli/CLI-node.js
@@ -44,7 +44,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);
});
View
14 javascript/src/core/TestRunner.js
@@ -210,10 +210,20 @@
* @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,
@@ -596,7 +606,7 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.