Skip to content

Commit f5601d0

Browse files
committed
Reformat
1 parent f90c918 commit f5601d0

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

packages/rsocket-router/tests/src/requests.test.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,24 @@ import { EndpointHandlerPayload, ErrorCode } from '@powersync/lib-services-frame
1212
* @param responder a mock responder
1313
* @returns
1414
*/
15-
async function handleRoute(path: string, endpoints: ReactiveEndpoint[], responder: SocketResponder, request?: Partial<ReactiveStreamRequest>) {
15+
async function handleRoute(
16+
path: string,
17+
endpoints: ReactiveEndpoint[],
18+
responder: SocketResponder,
19+
request?: Partial<ReactiveStreamRequest>
20+
) {
1621
return handleReactiveStream<{}>(
1722
{},
1823
{
1924
payload: {
2025
data: Buffer.from(serialize({})),
21-
metadata: Buffer.from(serialize({ path })),
26+
metadata: Buffer.from(serialize({ path }))
2227
},
2328
initialN: 1,
2429
dataMimeType: 'application/bson',
2530
metadataMimeType: 'application/bson',
2631
responder,
27-
...request,
32+
...request
2833
},
2934
createMockObserver(),
3035
new AbortController(),
@@ -145,21 +150,21 @@ describe('Requests', () => {
145150
const path = '/test-route';
146151

147152
const fn = vi.fn(async (p: EndpointHandlerPayload<any, any>) => {
148-
expect(p.params).toStrictEqual({'hello': 'world'});
153+
expect(p.params).toStrictEqual({ hello: 'world' });
149154
return undefined;
150155
});
151156

152157
await handleReactiveStream<{}>(
153158
{},
154159
{
155160
payload: {
156-
data: Buffer.from(encodeJson({'hello': 'world'})),
157-
metadata: Buffer.from(encodeJson({ path })),
161+
data: Buffer.from(encodeJson({ hello: 'world' })),
162+
metadata: Buffer.from(encodeJson({ path }))
158163
},
159164
metadataMimeType: 'application/json',
160165
dataMimeType: 'application/json',
161166
initialN: 1,
162-
responder,
167+
responder
163168
},
164169
createMockObserver(),
165170
new AbortController(),
@@ -169,7 +174,7 @@ describe('Requests', () => {
169174
{
170175
path,
171176
type: RS_ENDPOINT_TYPE.STREAM,
172-
handler: fn,
177+
handler: fn
173178
}
174179
],
175180
metaDecoder: async (buffer) => {

packages/service-errors/src/codes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export enum ErrorCode {
299299

300300
/**
301301
* 415 unsupported media type.
302-
*
302+
*
303303
* This code always indicates an issue with the client.
304304
*/
305305
PSYNC_S2004 = 'PSYNC_S2004',

0 commit comments

Comments
 (0)