DEV: Lint and test fixes.

DEV: Lint and test fixes.

diff --git a/assets/javascripts/initializers/spoiler-alert.js.es6 b/assets/javascripts/initializers/spoiler-alert.js.es6
index 9e9596d..42a8e4c 100644
--- a/assets/javascripts/initializers/spoiler-alert.js.es6
+++ b/assets/javascripts/initializers/spoiler-alert.js.es6
@@ -1,9 +1,12 @@
-import { withPluginApi, decorateCooked } from 'discourse/lib/plugin-api';
-import { Tag } from 'discourse/lib/to-markdown';
-import ComposerController from 'discourse/controllers/composer';
+import { withPluginApi, decorateCooked } from "discourse/lib/plugin-api";
+import { Tag } from "discourse/lib/to-markdown";
+import ComposerController from "discourse/controllers/composer";
 
 function spoil($elem) {
-  $('.spoiler', $elem).removeClass('spoiler').addClass('spoiled').spoil();
+  $(".spoiler", $elem)
+    .removeClass("spoiler")
+    .addClass("spoiled")
+    .spoil();
 }
 
 function initializeSpoiler(api) {
@@ -11,9 +14,9 @@ function initializeSpoiler(api) {
 
   api.addToolbarPopupMenuOptionsCallback(() => {
     return {
-      action: 'insertSpoiler',
-      icon: 'magic',
-      label: 'spoiler.title'
+      action: "insertSpoiler",
+      icon: "magic",
+      label: "spoiler.title"
     };
   });
 
@@ -74,9 +77,11 @@ function initializeSpoiler(api) {
 export default {
   name: "apply-spoilers",
   initialize(container) {
-    const siteSettings = container.lookup('site-settings:main');
+    const siteSettings = container.lookup("site-settings:main");
     if (siteSettings.spoiler_enabled) {
-      withPluginApi('0.5', initializeSpoiler, { noApi: () => decorateCooked(container, spoil) });
+      withPluginApi("0.5", initializeSpoiler, {
+        noApi: () => decorateCooked(container, spoil)
+      });
     }
   }
 };
diff --git a/test/javascripts/acceptance/spoiler-button-test.js.es6 b/test/javascripts/acceptance/spoiler-button-test.js.es6
index 63a8602..c7f0a86 100644
--- a/test/javascripts/acceptance/spoiler-button-test.js.es6
+++ b/test/javascripts/acceptance/spoiler-button-test.js.es6
@@ -18,7 +18,7 @@ test("spoiler button", async assert => {
 
   await click("#create-topic");
   await popUpMenu.expand();
-  await popUpMenu.selectRowByValue("insertSpoiler");
+  await popUpMenu.selectRowByValueAwait("insertSpoiler");
 
   assert.equal(
     find(".d-editor-input").val(),
@@ -44,7 +44,7 @@ test("spoiler button", async assert => {
   textarea.selectionEnd = textarea.value.length;
 
   await popUpMenu.expand();
-  await popUpMenu.selectRowByValue("insertSpoiler");
+  await popUpMenu.selectRowByValueAwait("insertSpoiler");
 
   assert.equal(
     find(".d-editor-input").val(),
@@ -69,7 +69,7 @@ test("spoiler button", async assert => {
   textarea.selectionEnd = 21;
 
   await popUpMenu.expand();
-  await popUpMenu.selectRowByValue("insertSpoiler");
+  await popUpMenu.selectRowByValueAwait("insertSpoiler");
 
   assert.equal(
     find(".d-editor-input").val(),
@@ -94,7 +94,7 @@ test("spoiler button", async assert => {
   textarea.selectionEnd = 21;
 
   await popUpMenu.expand();
-  await popUpMenu.selectRowByValue("insertSpoiler");
+  await popUpMenu.selectRowByValueAwait("insertSpoiler");
 
   assert.equal(
     find(".d-editor-input").val(),
diff --git a/test/javascripts/acceptance/to-markdown-test.js.es6 b/test/javascripts/acceptance/to-markdown-test.js.es6
index e0bd984..ad657c9 100644
--- a/test/javascripts/acceptance/to-markdown-test.js.es6
+++ b/test/javascripts/acceptance/to-markdown-test.js.es6
@@ -10,11 +10,8 @@ test("to-markdown", async assert => {
 
   let html = `<div>Text with a</div><div class="spoiled">spoiled</div><div>word.</div>`;
   let markdown = `Text with a\n\n[spoiler]spoiled[/spoiler]\n\nword.`;
-  assert.equal(
-    toMarkdown(html),
-    markdown,
-    "it should create spoiler tag"
-  );
+
+  assert.equal(toMarkdown(html), markdown, "it should create spoiler tag");
 
   html = `Inline <span class="spoiled">spoiled</span> word.`;
   markdown = `Inline [spoiler]spoiled[/spoiler] word.`;

GitHub
sha: 0e1271bf