REFACTOR: Remove Discourse.HighlightJSPath from globals

Instead we use the session, and pass that along where necessary.
This commit is contained in:
Robin Ward
2020-08-17 15:44:39 -04:00
parent 3745f2bb86
commit 5b2c306bb8
7 changed files with 16 additions and 9 deletions

View File

@ -8,7 +8,7 @@ componentTest("highlighting code", {
template: "{{highlighted-code lang='ruby' code=code}}",
beforeEach() {
Discourse.HighlightJSPath =
this.session.highlightJsPath =
"assets/highlightjs/highlight-test-bundle.min.js";
this.set("code", "def test; end");
},
@ -27,7 +27,7 @@ componentTest("large code blocks are not highlighted", {
template: "{{highlighted-code lang='ruby' code=code}}",
beforeEach() {
Discourse.HighlightJSPath =
this.session.highlightJsPath =
"assets/highlightjs/highlight-test-bundle.min.js";
this.set("code", LONG_CODE_BLOCK);
},