mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 13:03:50 +08:00
DEV: Remove a use of discourseModule (#29996)
This commit is contained in:
parent
f20db92512
commit
52b7280ad4
|
@ -1,10 +1,9 @@
|
|||
import { test } from "qunit";
|
||||
import { module, test } from "qunit";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import toMarkdown from "discourse/lib/to-markdown";
|
||||
import { discourseModule } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { initializeSpoiler } from "discourse/plugins/spoiler-alert/initializers/spoiler-alert";
|
||||
|
||||
discourseModule("Spoiler Alert | Unit | to-markdown", function (hooks) {
|
||||
module("Spoiler Alert | Unit | to-markdown", function (hooks) {
|
||||
hooks.beforeEach(function () {
|
||||
withPluginApi("0.5", initializeSpoiler);
|
||||
});
|
||||
|
@ -13,18 +12,14 @@ discourseModule("Spoiler Alert | Unit | to-markdown", function (hooks) {
|
|||
let html = `<div>Text with a</div><div class="spoiled spoiler-blurred">spoiled</div><div>word.</div>`;
|
||||
let markdown = `Text with a\n\n[spoiler]\nspoiled\n[/spoiler]\n\nword.`;
|
||||
|
||||
assert.strictEqual(
|
||||
toMarkdown(html),
|
||||
markdown,
|
||||
"it should create block spoiler tag"
|
||||
);
|
||||
assert.strictEqual(toMarkdown(html), markdown, "creates block spoiler tag");
|
||||
|
||||
html = `Inline <span class="spoiled">spoiled</span> word.`;
|
||||
markdown = `Inline [spoiler]spoiled[/spoiler] word.`;
|
||||
assert.strictEqual(
|
||||
toMarkdown(html),
|
||||
markdown,
|
||||
"it should create inline spoiler tag"
|
||||
"creates inline spoiler tag"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user