Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submitting here.. #3

Merged
merged 3 commits into from Apr 13, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion javascript/src/cli/CLI-node.js
Expand Up @@ -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);
});
Expand Down
14 changes: 12 additions & 2 deletions javascript/src/core/TestRunner.js
Expand Up @@ -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,

Expand Down Expand Up @@ -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
Expand Down