Fix missing semicolons

Ensure all statements end with a semicolon.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent 34aaeee354
commit 29f066a191
56 files changed
+242 -242

No files matched your search

+6 -6
View File
@@ -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");
})
});
});
});
});