Revert "Convert html.js to ES6 module format"

This reverts commit 60523d8e02de7b56113d4ef5090fe253ecadccd8.
This commit is contained in:
Robin Ward
2015-01-20 16:13:42 -05:00
parent 60523d8e02
commit 649dfd8d23
4 changed files with 35 additions and 40 deletions

View File

@ -1,13 +1,14 @@
module("Discourse.HTML");
import { getCustomHTML, setCustomHTML } from 'discourse/lib/html';
var html = Discourse.HTML;
test("customHTML", function() {
blank(getCustomHTML('evil'), "there is no custom HTML for a key by default");
blank(html.getCustomHTML('evil'), "there is no custom HTML for a key by default");
setCustomHTML('evil', 'trout');
equal(getCustomHTML('evil'), 'trout', 'it retrieves the custom html');
html.setCustomHTML('evil', 'trout');
equal(html.getCustomHTML('evil'), 'trout', 'it retrieves the custom html');
PreloadStore.store('customHTML', {cookie: 'monster'});
equal(getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
equal(html.getCustomHTML('cookie'), 'monster', 'it returns HTML fragments from the PreloadStore');
});