mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Fix missing semicolons
Ensure all statements end with a semicolon.
This commit is contained in:
1 parent
34aaeee354
commit
29f066a191
56 files changed
+242
-242
No files matched your search
@@ -142,8 +142,8 @@ let testLines = new Map([
|
||||
message: "Saving finished",
|
||||
}
|
||||
],
|
||||
])
|
||||
]);
|
||||
|
||||
module.exports = {
|
||||
testLines,
|
||||
}
|
||||
};
|
||||
@@ -213,7 +213,7 @@ describe("lib/factorio", function() {
|
||||
let zip = new jszip();
|
||||
zip.file("world/control.lua", "-- unknown\n");
|
||||
let zipPath = path.join("temp", "test", "patch.zip");
|
||||
await fs.outputFile(zipPath, await zip.generateAsync({type: "nodebuffer"}))
|
||||
await fs.outputFile(zipPath, await zip.generateAsync({type: "nodebuffer"}));
|
||||
|
||||
await assert.rejects(
|
||||
factorio.patch(zipPath, []),
|
||||
|
||||
@@ -84,7 +84,7 @@ describe("lib/factorio/server", function() {
|
||||
|
||||
describe("randomDynamicPort()", function() {
|
||||
it("should return a port number", function() {
|
||||
let port = factorio._randomDynamicPort()
|
||||
let port = factorio._randomDynamicPort();
|
||||
assert.equal(typeof port, "number");
|
||||
assert(Number.isInteger(port));
|
||||
assert(0 <= port && port < 2**16);
|
||||
@@ -203,25 +203,25 @@ describe("lib/factorio/server", function() {
|
||||
server._handleIpc(Buffer.from("\f$ipc:blah")),
|
||||
new Error('Malformed IPC line "\f$ipc:blah"')
|
||||
);
|
||||
})
|
||||
});
|
||||
it("should throw on unknown type", async function() {
|
||||
await assert.rejects(
|
||||
server._handleIpc(Buffer.from("\f$ipc:channel??")),
|
||||
new Error("Unknown IPC type '?'")
|
||||
);
|
||||
})
|
||||
});
|
||||
it("should throw on unknown file type", async function() {
|
||||
await assert.rejects(
|
||||
server._handleIpc(Buffer.from("\f$ipc:channel?ffoo.invalid")),
|
||||
new Error("Unknown IPC file format 'invalid'")
|
||||
);
|
||||
})
|
||||
});
|
||||
it("should throw on file name with slash", async function() {
|
||||
await assert.rejects(
|
||||
server._handleIpc(Buffer.from("\f$ipc:channel?fa/b")),
|
||||
new Error("Invalid IPC file name 'a/b'")
|
||||
);
|
||||
})
|
||||
});
|
||||
it("should load and delete json file", async function() {
|
||||
let filePath = server.writePath("script-output", "data.json");
|
||||
await fs.outputFile(filePath, '{"data":"spam"}');
|
||||
@@ -230,7 +230,7 @@ describe("lib/factorio/server", function() {
|
||||
let result = await waiter;
|
||||
assert.deepEqual(result[0], { "data": "spam" });
|
||||
assert(!await fs.pathExists(filePath), "File was not deleted");
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user