mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Reimplement plugin system
Implement a new plugin system based subclassing pre-defined base clases and communicating with pre-defined link messages.
This commit is contained in:
1 parent
513651393b
commit
bcceae687f
10 files changed
+688
-34
No files matched your search
+13
-10
@@ -8,17 +8,20 @@ const client = require("../client");
|
||||
describe("Client testing", function() {
|
||||
describe("class Instance", function() {
|
||||
let instance = new client._Instance(new link.VirtualConnector(), "dir", "factorioDir", { name:"foo" });
|
||||
it("should give the name on .name", function() {
|
||||
assert.equal(instance.name, "foo");
|
||||
})
|
||||
describe(".name", function() {
|
||||
it("should give the name of the instance", function() {
|
||||
assert.equal(instance.name, "foo");
|
||||
})
|
||||
});
|
||||
|
||||
it("should give the path to it on .path()", function() {
|
||||
assert.equal(instance.path(), "dir");
|
||||
})
|
||||
|
||||
it("should join path on .path(...parts)", function() {
|
||||
assert.equal(instance.path("bar"), path.join("dir", "bar"));
|
||||
})
|
||||
describe(".path()", function() {
|
||||
it("should give the path when called without arguments", function() {
|
||||
assert.equal(instance.path(), "dir");
|
||||
})
|
||||
it("should join path with arguments", function() {
|
||||
assert.equal(instance.path("bar"), path.join("dir", "bar"));
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
describe("checkFilename()", function() {
|
||||
|
||||
Reference in new issue
Block a user