This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/javascripts/hacks.js

21 lines
478 B
JavaScript

// hacks for ember, this sets up our app for testing
(function(){
var currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
$('<div id="main"><div class="rootElement"></div></div>').appendTo($('body')).hide();
Discourse.SiteSettings = {}
Discourse.Router.map(function() {
this.route("jasmine",{path: "/jasmine"});
Discourse.routeBuilder.apply(this)
});
}
})()