discourse/test/javascripts/helpers/qunit_helpers.js

15 lines
No EOL
453 B
JavaScript

function integration(name) {
module(name, {
setup: function() {
sinon.stub(Discourse.ScrollingDOMMethods, "bindOnScroll");
sinon.stub(Discourse.ScrollingDOMMethods, "unbindOnScroll");
Ember.run(Discourse, Discourse.advanceReadiness);
},
teardown: function() {
Discourse.reset();
Discourse.ScrollingDOMMethods.bindOnScroll.restore();
Discourse.ScrollingDOMMethods.unbindOnScroll.restore();
}
});
}