This is for @nzakas.
I added a config to YUITest.TestRunner to allow it to not throw on tests with no Assertions.
There are several test suites inside YUI that do not use Asserts since they use the "_should" assertions to tell if something throws or errors.
This just removes that extra assert when the config option is set.
Added config option to ignore tests with no asserts
The run() method accepts an options object that defines how the tests should be run. I think this would be better as an option on that object.
I didn't add it there because I wanted all tests to abide by this out of the box. With our large system, I didn't want to have to modify every single test module to add this parameter for backward compatibility. This gives a "one stop" place to set this and have it "just work" as it did before that assert was added.
I understand the intent, the problem is that this would create two places to specify options instead of one. I don't like the idea of having a global configuration for the TestRunner because your tests may have different results depending on the TestRunner being used...that should never happen. Also, having tests without asserts is a horrible practice, and I don't want to encourage that.
That being said, I'm willing to compromise with you. If you want this property, mark it as private and deprecated, and prefix it with an underscore. That way, at least it will be hidden or flagged in docs as something people shouldn't use. It can be a YUI-only thing.
That works! On it..
Making ignoreEmpty property private
Pushed up the change, and as an FYI, I added a ton of tests to the YUI source tree for YUITest:
We might be able to make them reusable for both projects.
Added version check to "flush" work around
In 0.6.x the drain event does not fire, which means
the process.exit(code) is never executed.
This prohibits automated scripts from failing on a failed
@nzakas Can you merge these in? The flush fix I just added makes using YUITest in a CI environment impossible with the latest stable Node.
I don't have access to the YUI account for merging in YUI Test
changes. Ryan always handled the merges for me.
Can you merge it into yours and publish a new npm package with the fix?
Once it's merged with yours, then i can merge it and push it to the yui account.
Sure, can you send the pull request to my fork?
Not sure how quickly I can get to it (still traveling), but I'll do my best.
Understood, take your time. Get to it when you can man..
Found a little time (just for you). Pushed 0.7.3.