From c0f9ee996187d8934d7722710ca16d5f54f75a1f Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 1 Jul 2026 12:00:42 +0200 Subject: [PATCH] lint --- README.md | 2 +- tests/attribution.tests.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 66d38cbe..3c5e7ca4 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ are implemented in separate modules. | [Superdoc](https://superdoc.dev/) | ✔ | (native) | [demo](https://superdoc.dev/) | | [valtio](https://github.com/pmndrs/valtio) | | [valtio-yjs](https://github.com/dai-shi/valtio-yjs) | [demo](https://codesandbox.io/s/valtio-yjs-demo-ox3iy) | | [immer](https://github.com/immerjs/immer) | | [immer-yjs](https://github.com/sep2/immer-yjs) | [demo](https://codesandbox.io/s/immer-yjs-demo-6e0znb) | -| [mutative](https://github.com/unadlib/mutative) | | [mutative-yjs](https://github.com/mutativejs/mutative-yjs) | [demo](https://codesandbox.io/p/sandbox/fjrwk3) | +| [mutative](https://github.com/unadlib/mutative) | | [mutative-yjs](https://github.com/mutativejs/mutative-yjs) | [demo](https://codesandbox.io/p/sandbox/fjrwk3) | | React | | [react-yjs](https://github.com/nikgraf/react-yjs) | [demo](https://react-yjs-example.vercel.app/) | | React / Vue / Svelte / MobX | | [SyncedStore](https://syncedstore.org) | [demo](https://syncedstore.org/docs/react) | | [mobx-keystone](https://mobx-keystone.js.org/) | | [mobx-keystone-yjs](https://github.com/xaviergonz/mobx-keystone/tree/master/packages/mobx-keystone-yjs) | [demo](https://mobx-keystone.js.org/examples/yjs-binding) | diff --git a/tests/attribution.tests.js b/tests/attribution.tests.js index 5a13a681..038c17fe 100644 --- a/tests/attribution.tests.js +++ b/tests/attribution.tests.js @@ -553,7 +553,8 @@ export const testRdtFormatRebold = () => { root.insert(0, 'abcdef') // diff against a baseline taken BEFORE formatting => every format change is an attributed suggestion root.useRenderer(Y.createDiffRenderer(Y.cloneDoc(doc), doc)) - void root.delta // first access starts maintaining the incremental cache + // first access starts maintaining the incremental cache (baseline == current, so no suggestions yet) + t.assert(root.delta.equals(delta.create().insert('abcdef').done())) root.format(0, 6, { bold: true }) // all bold root.format(2, 2, { bold: null }) // un-bold "cd" (inserts a transient bold:null marker) root.format(2, 2, { bold: true }) // re-bold "cd" => DELETES that transient marker @@ -592,7 +593,8 @@ export const testRdtFormatEmbedInBold = () => { const root = doc.get('root') root.insert(0, 'ab') root.useRenderer(Y.createDiffRenderer(Y.cloneDoc(doc), doc)) - void root.delta // first access starts maintaining the incremental cache + // first access starts maintaining the incremental cache (baseline == current, so no suggestions yet) + t.assert(root.delta.equals(delta.create().insert('ab').done())) root.format(0, 2, { bold: true }) // bold "ab" root.insert(1, [new Y.Type()]) // insert an embed inside the bold run: "ab" const cached = root.delta @@ -624,7 +626,8 @@ export const testRdtFormatDeleteFormatted = () => { const root = doc.get('root') root.insert(0, 'a') root.useRenderer(Y.createDiffRenderer(Y.cloneDoc(doc), doc)) // baseline before formatting - void root.delta // start maintaining the incremental cache + // start maintaining the incremental cache (baseline == current, so no suggestions yet) + t.assert(root.delta.equals(delta.create().insert('a').done())) root.format(0, 1, { bold: true }) // bold "a" root.delete(0, 1) // delete "a" const cached = root.delta