Skip to content

Commit f30220b

Browse files
committed
prettier
1 parent c12a2c4 commit f30220b

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

backend/message.test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test("distribute to self", () => {
2727
return true;
2828
}, 0);
2929

30-
client0.sendUpdate({ payload: "Hello" }, "") ;
30+
client0.sendUpdate({ payload: "Hello" }, "");
3131

3232
expect(client0Heard).toMatchObject([
3333
{ payload: "Hello", serial: 1, max_serial: 1 },
@@ -80,7 +80,7 @@ test("distribute to self and other", () => {
8080
]);
8181
expect(client1Heard).toMatchObject([
8282
{ payload: "Hello", serial: 1, max_serial: 1 },
83-
{ payload: "Bye", serial: 2, max_serial: 2 }
83+
{ payload: "Bye", serial: 2, max_serial: 2 },
8484
]);
8585

8686
expect(prepare(getMessages())).toEqual([
@@ -652,7 +652,6 @@ test("distribute to self and other, but other was disconnected", () => {
652652
type: "sent",
653653
instanceId: "3001",
654654
update: { payload: "Hello", serial: 1, max_serial: 1 },
655-
656655
},
657656
{
658657
type: "received",

backend/message.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import type {
66
import type { Message } from "../types/message";
77
import { getColorForId } from "./color";
88

9-
type UpdateListenerMulti = (
10-
updates: ReceivedStatusUpdate<any>[],
11-
) => boolean;
9+
type UpdateListenerMulti = (updates: ReceivedStatusUpdate<any>[]) => boolean;
1210

1311
type ClearListener = () => boolean;
1412
type DeleteListener = () => boolean;
@@ -150,10 +148,7 @@ class Processor implements IProcessor {
150148
this.clients.splice(client_index, 1);
151149
}
152150

153-
distribute(
154-
instanceId: string,
155-
update: SendingStatusUpdate<any>,
156-
) {
151+
distribute(instanceId: string, update: SendingStatusUpdate<any>) {
157152
this.currentSerial++;
158153
const receivedUpdate: ReceivedStatusUpdate<any> = {
159154
...update,
@@ -187,9 +182,7 @@ class Processor implements IProcessor {
187182
updateListener(
188183
this.updates
189184
.slice(serial)
190-
.map((update) =>
191-
({ ...update, max_serial: maxSerial })
192-
),
185+
.map((update) => ({ ...update, max_serial: maxSerial })),
193186
);
194187
}
195188
}

sim/webxdc.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FakeTransport implements Transport {
2727

2828
send(data: any) {
2929
if (data.type === "sendUpdate") {
30-
const { update} = data;
30+
const { update } = data;
3131
this.client.sendUpdate(update, "");
3232
} else if (data.type === "setUpdateListener") {
3333
this.client.connect(

0 commit comments

Comments
 (0)