mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
DEV: Clear tagsHtmlCallbacks after each test (#17530)
Fixes leakage between tests
This commit is contained in:
parent
343b8dd7aa
commit
39c35ee47d
@ -17,6 +17,11 @@ export function addTagsHtmlCallback(callback, options) {
|
|||||||
callbacks.splice(i, 0, callback);
|
callbacks.splice(i, 0, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function clearTagsHtmlCallbacks() {
|
||||||
|
callbacks = null;
|
||||||
|
priorities = null;
|
||||||
|
}
|
||||||
|
|
||||||
export default function (topic, params) {
|
export default function (topic, params) {
|
||||||
let tags = topic.tags;
|
let tags = topic.tags;
|
||||||
let buffer = "";
|
let buffer = "";
|
||||||
|
@ -69,6 +69,7 @@ import {
|
|||||||
clearTagDecorateCallbacks,
|
clearTagDecorateCallbacks,
|
||||||
clearTextDecorateCallbacks,
|
clearTextDecorateCallbacks,
|
||||||
} from "discourse/lib/to-markdown";
|
} from "discourse/lib/to-markdown";
|
||||||
|
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
||||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||||
|
|
||||||
export function currentUser() {
|
export function currentUser() {
|
||||||
@ -194,6 +195,7 @@ export function testCleanup(container, app) {
|
|||||||
clearTextDecorateCallbacks();
|
clearTextDecorateCallbacks();
|
||||||
clearResolverOptions();
|
clearResolverOptions();
|
||||||
clearLegacyResolverOptions();
|
clearLegacyResolverOptions();
|
||||||
|
clearTagsHtmlCallbacks();
|
||||||
clearToolbarCallbacks();
|
clearToolbarCallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user