Jörn Zaefferer
Jörn Zaefferer
I don't know what "sub-optimal" means here, but throwing an error with a message and stacktrace and aborting execution sounds sane for that kind of issue.
Whatever the solution here, I'd like you to consider a related, pretty important aspect: The exit code. Currently, setting the force option on tasks that support it will cause grunt...
> you can also throw new Error('...'); as well That should be an unexpected error and logged. Task authors should be encouraged to make a task fail properly without throwing...
jQuery Mobile uses AMD and QUnit, e.g. https://github.com/jquery/jquery-mobile/blob/master/tests/unit/button/index.html
Another reference, not about QUnit, but with lots of details on using AMD/requirejs with unit tests: http://weblog.bocoup.com/effective-unit-testing-with-amd/
@JamesMGreene would be great if you could look into this again
Here's another reference, with some questionable advice involving `autostart` and `load`: http://www.nathandavison.com/article/17/using-qunit-and-requirejs-to-build-modular-unit-tests
Well, one more reason to get a decent document out there.
Btw. @rxaviers is currently working on migrating jQuery UI's unit tests to requirejs. Once that is done, we should document the approach.
Yes, we should do that. I'm hopeful that the new jquery-release project will make that easier. For now waiting for https://github.com/jquery/jquery-release/pull/8 to land.