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:
parent
8cf29e1339
commit
3342741876
|
@ -10,6 +10,5 @@ public/javascripts/
|
||||||
spec/phantom_js/smoke_test.js
|
spec/phantom_js/smoke_test.js
|
||||||
test/javascripts/helpers/assertions.js
|
test/javascripts/helpers/assertions.js
|
||||||
test/javascripts/helpers/parse_html.js
|
test/javascripts/helpers/parse_html.js
|
||||||
test/javascripts/helpers/qunit_helpers.js
|
|
||||||
test/javascripts/test_helper.js
|
test/javascripts/test_helper.js
|
||||||
vendor/
|
vendor/
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* global asyncTest */
|
||||||
|
/* exported integration, testController, controllerFor, asyncTestDiscourse, fixture */
|
||||||
function integration(name, lifecycle) {
|
function integration(name, lifecycle) {
|
||||||
module("Integration: " + name, {
|
module("Integration: " + name, {
|
||||||
setup: function() {
|
setup: function() {
|
||||||
|
@ -27,7 +29,7 @@ function testController(klass, model) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function controllerFor(controller, model) {
|
function controllerFor(controller, model) {
|
||||||
var controller = Discourse.__container__.lookup('controller:' + controller);
|
controller = Discourse.__container__.lookup('controller:' + controller);
|
||||||
if (model) { controller.set('model', model ); }
|
if (model) { controller.set('model', model ); }
|
||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue