Skip to content

Commit c209dc2

Browse files
committed
style(reactive-rpc): 💄 run Prettier
1 parent 9df37a0 commit c209dc2

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

src/reactive-rpc/server/ws/server/WsServerConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class WsServerConnection {
6161
const isLast = currentFrameHeader.fin === 1;
6262
currentFrameHeader = null;
6363
if (isLast) fragmentStartFrameHeader = null;
64-
this.onfragment(isLast, buf, isText)
64+
this.onfragment(isLast, buf, isText);
6565
} else {
6666
const isText = currentFrameHeader.opcode === WsFrameOpcode.TEXT;
6767
currentFrameHeader = null;

src/reactive-rpc/server/ws/server/__tests__/WsServerConnection.spec.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,7 @@ describe('.onmessage', () => {
105105
encoder.writer.buf(Buffer.from([0x04, 0x05, 0x06]), 3);
106106
const payload2 = encoder.writer.flush();
107107
socket.write(pingFrame);
108-
socket.write(listToUint8([
109-
frame1,
110-
payload1,
111-
frame2,
112-
payload2,
113-
]));
108+
socket.write(listToUint8([frame1, payload1, frame2, payload2]));
114109
await until(() => messages.length === 2);
115110
expect(messages[0]).toEqual([new Uint8Array([0x01, 0x02, 0x03]), false]);
116111
expect(messages[1]).toEqual([new Uint8Array([0x04, 0x05, 0x06]), false]);
@@ -135,18 +130,13 @@ describe('.onmessage', () => {
135130
encoder.writer.buf(Buffer.from([0x04, 0x05, 0x06, 0x07]), 4);
136131
const payload2 = encoder.writer.flush();
137132
socket.write(pingFrame);
138-
socket.write(listToUint8([
139-
frame1,
140-
payload1,
141-
frame2,
142-
payload2,
143-
]));
133+
socket.write(listToUint8([frame1, payload1, frame2, payload2]));
144134
await until(() => messages.length === 1);
145135
await until(() => closes.length === 1);
146136
expect(messages[0]).toEqual([new Uint8Array([0x01, 0x02, 0x03]), false]);
147137
expect(closes[0]).toEqual([1009, 'TOO_LARGE']);
148138
});
149-
139+
150140
test('text frame', async () => {
151141
const {socket, encoder, connection} = setup();
152142
const messages: [data: Uint8Array, isUtf8: boolean][] = [];
@@ -184,7 +174,7 @@ describe('.onmessage', () => {
184174
await until(() => messages.length === 1);
185175
expect(messages[0]).toEqual([new Uint8Array([0x01, 0x02, 0x03]), false]);
186176
});
187-
177+
188178
test('text frame', async () => {
189179
const {socket, encoder, connection} = setup();
190180
const messages: [data: Uint8Array, isUtf8: boolean][] = [];
@@ -263,9 +253,7 @@ describe('.onfragment', () => {
263253
socket.write(buf5);
264254
socket.write(buf6);
265255
await until(() => messages.length === 1);
266-
expect(messages).toEqual([
267-
[new Uint8Array([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,0x08, 0x09]), false],
268-
]);
256+
expect(messages).toEqual([[new Uint8Array([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]), false]]);
269257
});
270258

271259
test('errors out when incoming message is too large', async () => {
@@ -293,9 +281,7 @@ describe('.onfragment', () => {
293281
socket.write(buf5);
294282
socket.write(buf6);
295283
await until(() => closes.length === 1);
296-
expect(closes).toEqual([
297-
[1009, 'TOO_LARGE'],
298-
]);
284+
expect(closes).toEqual([[1009, 'TOO_LARGE']]);
299285
});
300286
});
301287
});

0 commit comments

Comments
 (0)