mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +09:00
Ignore missing plugins instead of throwing
This commit is contained in:
1 parent
fea07e4f55
commit
79c4bf1441
1 file changed
+3
-5
@@ -33,11 +33,9 @@ describe("lib/plugin_loader", function() {
|
|||||||
await writePlugin(invalidPlugin, "wrong");
|
await writePlugin(invalidPlugin, "wrong");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should throw on missing plugin", async function() {
|
it("should ignore missing plugins", async function() {
|
||||||
await assert.rejects(
|
const result = await lib.loadPluginInfos(new Map([["missing", missingPlugin]]), []);
|
||||||
lib.loadPluginInfos(new Map([["missing", missingPlugin]]), []),
|
assert.deepEqual(result, []);
|
||||||
new RegExp(`^Error: PluginError: Cannot find module '${escapeRegExp(missingPlugin)}'`)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
it("should load test plugin", async function() {
|
it("should load test plugin", async function() {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
|
|||||||
Reference in new issue
Block a user