DEV: introduces prettier for es6 files

This commit is contained in:
Joffrey JAFFEUX
2018-06-15 17:03:24 +02:00
committed by GitHub
parent c7ee70941e
commit 03a7d532cf
1162 changed files with 60667 additions and 29659 deletions
@@ -1,30 +1,40 @@
import { acceptance } from "helpers/qunit-helpers";
import { setCustomHTML } from 'discourse/helpers/custom-html';
import PreloadStore from 'preload-store';
import { setCustomHTML } from "discourse/helpers/custom-html";
import PreloadStore from "preload-store";
acceptance("CustomHTML set");
QUnit.test("has no custom HTML in the top", assert => {
visit("/static/faq");
andThen(() => {
assert.ok(!exists('span.custom-html-test'), 'it has no markup');
assert.ok(!exists("span.custom-html-test"), "it has no markup");
});
});
QUnit.test("renders set HTML", assert => {
setCustomHTML('top', '<span class="custom-html-test">HTML</span>');
setCustomHTML("top", '<span class="custom-html-test">HTML</span>');
visit("/static/faq");
andThen(() => {
assert.equal(find('span.custom-html-test').text(), 'HTML', 'it inserted the markup');
assert.equal(
find("span.custom-html-test").text(),
"HTML",
"it inserted the markup"
);
});
});
QUnit.test("renders preloaded HTML", assert => {
PreloadStore.store('customHTML', {top: "<span class='cookie'>monster</span>"});
PreloadStore.store("customHTML", {
top: "<span class='cookie'>monster</span>"
});
visit("/static/faq");
andThen(() => {
assert.equal(find('span.cookie').text(), 'monster', 'it inserted the markup');
assert.equal(
find("span.cookie").text(),
"monster",
"it inserted the markup"
);
});
});
});