From 52b7280ad4413e30240110bf32e7ee1f72cc735f Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 29 Nov 2024 18:16:21 +0100 Subject: [PATCH] DEV: Remove a use of discourseModule (#29996) --- .../test/javascripts/unit/lib/to-markdown-test.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/spoiler-alert/test/javascripts/unit/lib/to-markdown-test.js b/plugins/spoiler-alert/test/javascripts/unit/lib/to-markdown-test.js index 30cbb9f5922..895150a9685 100644 --- a/plugins/spoiler-alert/test/javascripts/unit/lib/to-markdown-test.js +++ b/plugins/spoiler-alert/test/javascripts/unit/lib/to-markdown-test.js @@ -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 = `
Text with a
spoiled
word.
`; 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 spoiled word.`; markdown = `Inline [spoiler]spoiled[/spoiler] word.`; assert.strictEqual( toMarkdown(html), markdown, - "it should create inline spoiler tag" + "creates inline spoiler tag" ); }); });