From d3ce185edf5c56773d4ef3f792d0b4d80fea717f Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Wed, 31 Jul 2024 09:55:05 -0600 Subject: [PATCH] fix: format --- packages/core/src/__tests__/recon.test.ts | 27 +++++++++++++---------- packages/core/src/recon.ts | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/core/src/__tests__/recon.test.ts b/packages/core/src/__tests__/recon.test.ts index 457876d3f5..d3885545da 100644 --- a/packages/core/src/__tests__/recon.test.ts +++ b/packages/core/src/__tests__/recon.test.ts @@ -94,14 +94,16 @@ describe('ReconApi', () => { const fakeInterest1 = TestUtils.randomStreamID() await reconApi.init('testInitialCursor', [fakeInterest0, fakeInterest1]) expect(mockSendRequest).toHaveBeenCalledTimes(4) - expect(mockSendRequest).toHaveBeenCalledWith( - `${RECON_URL}/ceramic/interests`, - { method: 'POST', body: { sep: "model", sepValue: fakeInterest0.toString() }, headers: { 'Content-Type': 'application/json' } } - ) - expect(mockSendRequest).toHaveBeenCalledWith( - `${RECON_URL}/ceramic/interests`, - { method: 'POST', body: { sep: "model", sepValue: fakeInterest1.toString() }, headers: { 'Content-Type': 'application/json' } } - ) + expect(mockSendRequest).toHaveBeenCalledWith(`${RECON_URL}/ceramic/interests`, { + method: 'POST', + body: { sep: 'model', sepValue: fakeInterest0.toString() }, + headers: { 'Content-Type': 'application/json' }, + }) + expect(mockSendRequest).toHaveBeenCalledWith(`${RECON_URL}/ceramic/interests`, { + method: 'POST', + body: { sep: 'model', sepValue: fakeInterest1.toString() }, + headers: { 'Content-Type': 'application/json' }, + }) reconApi.stop() }) }) @@ -120,10 +122,11 @@ describe('ReconApi', () => { test('should be able to register interest in a model', async () => { await reconApi.registerInterest(MODEL) - expect(mockSendRequest).toHaveBeenCalledWith( - `${RECON_URL}/ceramic/interests`, - { method: 'POST', body: { sep: "model", sepValue: MODEL.toString() }, headers: { 'Content-Type': 'application/json' } } - ) + expect(mockSendRequest).toHaveBeenCalledWith(`${RECON_URL}/ceramic/interests`, { + method: 'POST', + body: { sep: 'model', sepValue: MODEL.toString() }, + headers: { 'Content-Type': 'application/json' }, + }) }) }) diff --git a/packages/core/src/recon.ts b/packages/core/src/recon.ts index 04067c1cbb..2b4758d03c 100644 --- a/packages/core/src/recon.ts +++ b/packages/core/src/recon.ts @@ -171,7 +171,7 @@ export class ReconApi extends Observable implements IRec } try { const headers = { 'Content-Type': 'application/json' } - const body = { sep: "model", sepValue: model.toString(), ...(controller && { controller }) } + const body = { sep: 'model', sepValue: model.toString(), ...(controller && { controller }) } await this.#sendRequest(this.#url + `/ceramic/interests`, { method: 'POST', headers,