JSHint QUnit helpers

- Don’t redefine controller
- Mark all functions as exported
- Mark the QUnit asyncTest as a global function
This commit is contained in:
Nick Schonning 2014-03-11 02:30:49 -04:00
parent 8cf29e1339
commit 3342741876
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,5 @@ public/javascripts/
spec/phantom_js/smoke_test.js
test/javascripts/helpers/assertions.js
test/javascripts/helpers/parse_html.js
test/javascripts/helpers/qunit_helpers.js
test/javascripts/test_helper.js
vendor/

View File

@ -1,3 +1,5 @@
/* global asyncTest */
/* exported integration, testController, controllerFor, asyncTestDiscourse, fixture */
function integration(name, lifecycle) {
module("Integration: " + name, {
setup: function() {
@ -27,7 +29,7 @@ function testController(klass, model) {
}
function controllerFor(controller, model) {
var controller = Discourse.__container__.lookup('controller:' + controller);
controller = Discourse.__container__.lookup('controller:' + controller);
if (model) { controller.set('model', model ); }
return controller;
}