mirror of
https://github.com/discourse/discourse.git
synced 2025-06-15 14:03:34 +08:00
Revert "Convert html.js to ES6 module format"
This reverts commit 60523d8e02de7b56113d4ef5090fe253ecadccd8.
This commit is contained in:
@ -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');
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user