Skip to content

A platform for community discussion. Free, open, simple.

FIX: QUnit site has to be set before `reset()`

Robin Ward71e747b16093
diff --git a/test/javascripts/helpers/qunit-helpers.js b/test/javascripts/helpers/qunit-helpers.js
index 7d1018beb38..c51cec6f62e 100644
--- a/test/javascripts/helpers/qunit-helpers.js
+++ b/test/javascripts/helpers/qunit-helpers.js
@@ -170,15 +170,15 @@ export function acceptance(name, options) {
clearHTMLCache();
resetPluginApi();
+ if (options.site) {
+ resetSite(currentSettings(), options.site);
+ }
+
Discourse.reset();
this.container = getOwner(this);
setURLContainer(this.container);
setDefaultOwner(this.container);
- if (options.site) {
- resetSite(currentSettings(), options.site);
- }
-
if (options.beforeEach) {
options.beforeEach.call(this);
}