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:
Hornwitser committed 2023-07-26 14:27:49 +02:00
1 parent cb21a63ac2
commit 156d517976
7 files changed
+130 -77

No files matched your search

+16 -8
View File
@@ -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);
});