mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +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");
|
||||
});
|
||||
|
||||
it("should throw on missing plugin", async function() {
|
||||
await assert.rejects(
|
||||
lib.loadPluginInfos(new Map([["missing", missingPlugin]]), []),
|
||||
new RegExp(`^Error: PluginError: Cannot find module '${escapeRegExp(missingPlugin)}'`)
|
||||
);
|
||||
it("should ignore missing plugins", async function() {
|
||||
const result = await lib.loadPluginInfos(new Map([["missing", missingPlugin]]), []);
|
||||
assert.deepEqual(result, []);
|
||||
});
|
||||
it("should load test plugin", async function() {
|
||||
assert.deepEqual(
|
||||
|
||||
Reference in new issue
Block a user