mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Lots of work on tests
This commit is contained in:
@@ -6,4 +6,4 @@ function parseHTML(rawHtml) {
|
||||
|
||||
parser.parseComplete(rawHtml);
|
||||
return builder.dom;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
/* global asyncTest, requirejs, require */
|
||||
/* global asyncTest */
|
||||
/* exported integration, testController, controllerFor, asyncTestDiscourse, fixture */
|
||||
|
||||
|
||||
function integration(name, lifecycle) {
|
||||
module("Integration: " + name, {
|
||||
setup: function() {
|
||||
sinon.stub(Discourse.ScrollingDOMMethods, "bindOnScroll");
|
||||
sinon.stub(Discourse.ScrollingDOMMethods, "unbindOnScroll");
|
||||
Ember.run(Discourse, Discourse.advanceReadiness);
|
||||
|
||||
if (lifecycle && lifecycle.setup) {
|
||||
lifecycle.setup.call(this);
|
||||
}
|
||||
Discourse.reset();
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
@@ -20,8 +16,6 @@ function integration(name, lifecycle) {
|
||||
}
|
||||
|
||||
Discourse.reset();
|
||||
Discourse.ScrollingDOMMethods.bindOnScroll.restore();
|
||||
Discourse.ScrollingDOMMethods.unbindOnScroll.restore();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -32,14 +26,6 @@ function controllerFor(controller, model) {
|
||||
return controller;
|
||||
}
|
||||
|
||||
function viewClassFor(name) {
|
||||
return Discourse.__container__.lookupFactory('view:' + name);
|
||||
}
|
||||
|
||||
function componentClassFor(name) {
|
||||
return Discourse.__container__.lookupFactory('component:' + name);
|
||||
}
|
||||
|
||||
function asyncTestDiscourse(text, func) {
|
||||
asyncTest(text, function () {
|
||||
var self = this;
|
||||
|
||||
Reference in New Issue
Block a user