import { module, test } from "qunit"; import { withPluginApi } from "discourse/lib/plugin-api"; import toMarkdown from "discourse/lib/to-markdown"; import { initializeSpoiler } from "discourse/plugins/spoiler-alert/initializers/spoiler-alert"; module("Spoiler Alert | Unit | to-markdown", function (hooks) { hooks.beforeEach(function () { withPluginApi("0.5", initializeSpoiler); }); test("handles spoiler tags", function (assert) { let html = `