mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
test(highlightjs): ensure language registration works
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, it } from "vitest";
|
||||
import definitions from "./syntax_highlighting.js";
|
||||
import hljs from "highlight.js";
|
||||
|
||||
describe("Syntax highlighting definitions", () => {
|
||||
it("every entry is readable", async () => {
|
||||
@@ -8,7 +9,12 @@ describe("Syntax highlighting definitions", () => {
|
||||
continue;
|
||||
}
|
||||
|
||||
await mapping.loader;
|
||||
const language = (await mapping.loader).default;
|
||||
|
||||
hljs.registerLanguage(mime, language);
|
||||
hljs.highlight("Hello world", {
|
||||
language: mime
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user