1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/editor/CodeMirror/testUtil/loadLanguages.ts

13 lines
413 B
TypeScript
Raw Normal View History

import syntaxHighlightingLanguages from '../markdown/syntaxHighlightingLanguages';
// Ensure languages we use are loaded. Without this, tests may randomly fail (LanguageDescriptions
// are loaded asyncronously, in the background).
const loadLangauges = async () => {
const allLanguages = syntaxHighlightingLanguages;
for (const lang of allLanguages) {
await lang.load();
}
};
export default loadLangauges;