mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Allow removing properties with set-prop
Implement removal of properties in ConfigGroup.setProp, set_instance_config_prop, and the set-prop clusterioctl command.
This commit is contained in:
1 parent
dea3a30cae
commit
0e21060ea3
4 files changed
+24
-11
No files matched your search
@@ -397,6 +397,12 @@ describe("lib/config/classes", function() {
|
||||
testInstance.setProp("json", "test", true);
|
||||
assert.deepEqual(testInstance.get("json"), { test: true });
|
||||
});
|
||||
|
||||
it("should unset field if passed undefined", function() {
|
||||
testInstance.set("json", { test: true, extra: "yes" });
|
||||
testInstance.setProp("json", "extra", undefined);
|
||||
assert.deepEqual(testInstance.get("json"), { test: true });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user