mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Fix usage of assert.rejects
This commit is contained in:
8 files changed
+47
-47
No files matched your search
@@ -115,9 +115,9 @@ describe("messages/plugin", function() {
|
||||
});
|
||||
it("rejects if updates are disabled on the controller", async function() {
|
||||
controller.config.set("controller.allow_plugin_updates", false);
|
||||
assert.rejects(
|
||||
await assert.rejects(
|
||||
controlConnection.handlePluginUpdateRequest(new lib.PluginUpdateRequest("foo")),
|
||||
"Plugin updates are disabled on this machine"
|
||||
/Plugin updates are disabled on this machine/
|
||||
);
|
||||
});
|
||||
it("runs on a host", async function() {
|
||||
@@ -127,9 +127,9 @@ describe("messages/plugin", function() {
|
||||
});
|
||||
it("rejects if updates are disabled on the host", async function() {
|
||||
host.config.set("host.allow_plugin_updates", false);
|
||||
assert.rejects(
|
||||
await assert.rejects(
|
||||
host.handlePluginUpdateRequest(new lib.PluginUpdateRequest("foo")),
|
||||
"Plugin updates are disabled on this machine"
|
||||
/Plugin updates are disabled on this machine/
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -156,9 +156,9 @@ describe("messages/plugin", function() {
|
||||
});
|
||||
it("rejects if updates are disabled on the controller", async function() {
|
||||
controller.config.set("controller.allow_plugin_install", false);
|
||||
assert.rejects(
|
||||
await assert.rejects(
|
||||
controlConnection.handlePluginInstallRequest(new lib.PluginInstallRequest("foo")),
|
||||
"Plugin updates are disabled on this machine"
|
||||
/Plugin updates are disabled on this machine/
|
||||
);
|
||||
});
|
||||
it("runs on a host", async function() {
|
||||
@@ -167,9 +167,9 @@ describe("messages/plugin", function() {
|
||||
});
|
||||
it("rejects if updates are disabled on the host", async function() {
|
||||
host.config.set("host.allow_plugin_install", false);
|
||||
assert.rejects(
|
||||
await assert.rejects(
|
||||
host.handlePluginInstallRequest(new lib.PluginInstallRequest("foo")),
|
||||
"Plugin updates are disabled on this machine"
|
||||
/Plugin updates are disabled on this machine/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user