mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Prefer putting nested structures on new lines
Format arguments to have nested structures start on a new line instead of inline to make it easier to see where the structures starts and what structure it is.
This commit is contained in:
1 parent
cb21a63ac2
commit
156d517976
7 files changed
+130
-77
No files matched your search
@@ -95,18 +95,26 @@ describe("lib/link/connectors", function() {
|
||||
it("should call register on hello", function() {
|
||||
let called = false;
|
||||
testConnector.register = () => { called = true; };
|
||||
testConnector._processHandshake(new libData.MessageHello(new libData.HelloData("test", {})));
|
||||
testConnector._processHandshake(
|
||||
new libData.MessageHello(
|
||||
new libData.HelloData("test", {})
|
||||
)
|
||||
);
|
||||
assert(called, "register was not called");
|
||||
});
|
||||
it("should emit connect on ready", async function() {
|
||||
let result = events.once(testConnector, "connect");
|
||||
testConnector._processHandshake(new libData.MessageReady(new libData.ReadyData(
|
||||
new libData.Address(libData.Address.control, 1),
|
||||
"x",
|
||||
20,
|
||||
10,
|
||||
undefined
|
||||
)));
|
||||
testConnector._processHandshake(
|
||||
new libData.MessageReady(
|
||||
new libData.ReadyData(
|
||||
new libData.Address(libData.Address.control, 1),
|
||||
"x",
|
||||
20,
|
||||
10,
|
||||
undefined
|
||||
)
|
||||
)
|
||||
);
|
||||
await result;
|
||||
clearInterval(testConnector._heartbeatId);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user