From bbb955db66a9ce9ae0daeae242df243ba1223741 Mon Sep 17 00:00:00 2001 From: streamich Date: Tue, 24 Sep 2024 14:59:54 +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 --- .../__tests__/Model.applyLocalPatch.spec.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/json-crdt/model/__tests__/Model.applyLocalPatch.spec.ts b/src/json-crdt/model/__tests__/Model.applyLocalPatch.spec.ts index 5f846b620c..13b1b6c597 100644 --- a/src/json-crdt/model/__tests__/Model.applyLocalPatch.spec.ts +++ b/src/json-crdt/model/__tests__/Model.applyLocalPatch.spec.ts @@ -7,20 +7,20 @@ describe('.applyLocalPatch()', () => { const doc1 = Model.create(schema); const doc2 = doc1.clone(); const time1 = doc1.clock.time; - doc1.s.toApi().set({'a': 1}); + doc1.s.toApi().set({a: 1}); const time2 = doc1.clock.time; - doc2.s.toApi().set({'b': 2}); + doc2.s.toApi().set({b: 2}); const time3 = doc1.clock.time; expect(time2 > time1).toBe(true); expect(time2).toBe(time3); const patch = doc2.api.flush()!; const time4 = patch.getId()!.time; expect(time4).toBe(time1); - expect(doc1.view()).toEqual({'a': 1}); + expect(doc1.view()).toEqual({a: 1}); doc1.applyLocalPatch(patch); const time5 = doc1.clock.time; expect(time5 > time3).toBe(true); - expect(doc1.view()).toEqual({'a': 1, 'b': 2}); + expect(doc1.view()).toEqual({a: 1, b: 2}); }); test('does not advance clock of a patch of a fork', () => { @@ -28,19 +28,19 @@ describe('.applyLocalPatch()', () => { const doc1 = Model.create(schema); const doc2 = doc1.fork(); const time1 = doc1.clock.time; - doc1.s.toApi().set({'a': 1}); + doc1.s.toApi().set({a: 1}); const time2 = doc1.clock.time; - doc2.s.toApi().set({'b': 2}); + doc2.s.toApi().set({b: 2}); const time3 = doc1.clock.time; expect(time2 > time1).toBe(true); expect(time2).toBe(time3); const patch = doc2.api.flush()!; const time4 = patch.getId()!.time; expect(time4).toBe(time1); - expect(doc1.view()).toEqual({'a': 1}); + expect(doc1.view()).toEqual({a: 1}); doc1.applyLocalPatch(patch); const time5 = doc1.clock.time; expect(time5).toBe(time3); - expect(doc1.view()).toEqual({'a': 1, 'b': 2}); + expect(doc1.view()).toEqual({a: 1, b: 2}); }); });