DEV: Remove the router testing hack (#18640)

Doesn't seem to be needed anymore (and it doesn't work anymore with some stuff I'm updating)
This commit is contained in:
Jarek Radosz 2022-10-18 14:34:33 +02:00 committed by GitHub
parent cb87067c77
commit b6297f5dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions

View File

@ -11,7 +11,7 @@ import {
mergeSettings,
} from "discourse/tests/helpers/site-settings";
import { forceMobile, resetMobile } from "discourse/lib/mobile";
import { getApplication, getContext, settled } from "@ember/test-helpers";
import { getApplication, settled } from "@ember/test-helpers";
import { getOwner } from "discourse-common/lib/get-owner";
import { run } from "@ember/runloop";
import { setupApplicationTest } from "ember-qunit";
@ -381,15 +381,6 @@ export function acceptance(name, optionsOrCallback) {
callback(needs);
setupApplicationTest(hooks);
hooks.beforeEach(function () {
// This hack seems necessary to allow `DiscourseURL` to use the testing router
let ctx = getContext();
this.container.registry.unregister("router:main");
this.container.registry.register("router:main", ctx.owner.router, {
instantiate: false,
});
});
});
} else {
// Old way