DEV: prevents post-cooked decorators to leak between tests (#7744)

This commit is contained in:
Joffrey JAFFEUX
2019-06-11 10:02:10 +02:00
committed by GitHub
parent 62c56b6e59
commit 4deb0f6d59
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import { flushMap } from "discourse/models/store";
import { clearRewrites } from "discourse/lib/url";
import { initSearchData } from "discourse/widgets/search-menu";
import { resetDecorators } from "discourse/widgets/widget";
import { resetDecorators as resetPostCookedDecorators } from "discourse/widgets/post-cooked";
import { resetCache as resetOneboxCache } from "pretty-text/oneboxer";
import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic";
@ -124,6 +125,7 @@ export function acceptance(name, options) {
clearRewrites();
initSearchData();
resetDecorators();
resetPostCookedDecorators();
resetOneboxCache();
resetCustomPostMessageCallbacks();
Discourse.reset();