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:
Hornwitser committed 2019-12-14 17:48:56 +01:00
1 parent 513651393b
commit bcceae687f
10 files changed
+688 -34

No files matched your search

+13 -10
View File
@@ -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() {