1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Update theme tests to ensure monaco is loaded

This commit is contained in:
Nick O'Leary 2022-07-03 20:37:55 +01:00
parent 13e8aeae4e
commit ca20f41d0e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -51,7 +51,7 @@ describe("api/editor/theme", function () {
context.should.have.a.property("asset"); context.should.have.a.property("asset");
context.asset.should.have.a.property("red", "red/red.min.js"); context.asset.should.have.a.property("red", "red/red.min.js");
context.asset.should.have.a.property("main", "red/main.min.js"); context.asset.should.have.a.property("main", "red/main.min.js");
context.asset.should.have.a.property("vendorMonaco", ""); context.asset.should.have.a.property("vendorMonaco", "vendor/monaco/monaco-bootstrap.js");
should.not.exist(theme.settings()); should.not.exist(theme.settings());
}); });
@ -69,16 +69,16 @@ describe("api/editor/theme", function () {
} }
}); });
it("Adds monaco bootstrap when enabled", async function () { it("Does not add monaco bootstrap when ace selected", async function () {
theme.init({ theme.init({
editorTheme: { editorTheme: {
codeEditor: { codeEditor: {
lib: 'monaco' lib: 'ace'
} }
} }
}); });
var context = await theme.context(); var context = await theme.context();
context.asset.should.have.a.property("vendorMonaco", "vendor/monaco/monaco-bootstrap.js"); context.asset.should.have.a.property("vendorMonaco", "");
}); });
it("picks up custom theme", async function () { it("picks up custom theme", async function () {