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);
|
||||
}
|
||||
|
||||
export function clearTagsHtmlCallbacks() {
|
||||
callbacks = null;
|
||||
priorities = null;
|
||||
}
|
||||
|
||||
export default function (topic, params) {
|
||||
let tags = topic.tags;
|
||||
let buffer = "";
|
||||
|
@ -69,6 +69,7 @@ import {
|
||||
clearTagDecorateCallbacks,
|
||||
clearTextDecorateCallbacks,
|
||||
} from "discourse/lib/to-markdown";
|
||||
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||
|
||||
export function currentUser() {
|
||||
@ -194,6 +195,7 @@ export function testCleanup(container, app) {
|
||||
clearTextDecorateCallbacks();
|
||||
clearResolverOptions();
|
||||
clearLegacyResolverOptions();
|
||||
clearTagsHtmlCallbacks();
|
||||
clearToolbarCallbacks();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user