From cc7ba8d8cb11fa8cb820ef10895fb9a4c093248a Mon Sep 17 00:00:00 2001 From: streamich Date: Sun, 28 Apr 2024 15:54:06 +0200 Subject: [PATCH] =?UTF-8?q?style(json-crdt):=20=F0=9F=92=84=20run=20Pretti?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/__tests__/Model.setSchema.spec.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/json-crdt/model/__tests__/Model.setSchema.spec.ts b/src/json-crdt/model/__tests__/Model.setSchema.spec.ts index c22d5d3b73..fc0064e523 100644 --- a/src/json-crdt/model/__tests__/Model.setSchema.spec.ts +++ b/src/json-crdt/model/__tests__/Model.setSchema.spec.ts @@ -28,10 +28,12 @@ test('can set map schema', () => { }); test('uses global session ID by default', () => { - const model = Model.withLogicalClock().setSchema(s.obj({ - id: s.str('asdf'), - num: s.con(123), - })); + const model = Model.withLogicalClock().setSchema( + s.obj({ + id: s.str('asdf'), + num: s.con(123), + }), + ); expect(model.api.r.get().node.id.sid).toBe(SESSION.GLOBAL); expect(model.api.r.get().get('id').node.id.sid).toBe(SESSION.GLOBAL); expect(model.api.r.get().get('num').node.id.sid).toBe(SESSION.GLOBAL); @@ -49,10 +51,12 @@ test('allows to specify custom session ID', () => { }); test('resets session ID to user specified', () => { - const model = Model.withLogicalClock().setSchema(s.obj({ - id: s.str('asdf'), - num: s.con(123), - })); + const model = Model.withLogicalClock().setSchema( + s.obj({ + id: s.str('asdf'), + num: s.con(123), + }), + ); expect(model.view().num).toBe(123); expect(model.api.r.get().get('num').node.id.sid).toBe(SESSION.GLOBAL); model.api.r.get().set({