From b63d22e7db1ce24859e71ffd279054aaf9ed4e62 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 18 May 2022 10:50:31 +0200 Subject: [PATCH] lint --- tests/encoding.tests.js | 2 +- tests/undo-redo.tests.js | 2 +- tests/y-array.tests.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/encoding.tests.js b/tests/encoding.tests.js index 73c396aa..744c1ee7 100644 --- a/tests/encoding.tests.js +++ b/tests/encoding.tests.js @@ -77,7 +77,7 @@ export const testDiffStateVectorOfUpdateIsEmpty = tc => { /** * @type {null | Uint8Array} */ - let sv = /* any */ (null) + let sv = /** @type {any} */ (null) ydoc.getText().insert(0, 'a') ydoc.on('update', update => { sv = Y.encodeStateVectorFromUpdate(update) diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 1bf25c82..8e7bc335 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -273,7 +273,7 @@ export const testUndoInEmbed = tc => { */ export const testUndoDeleteFilter = tc => { /** - * @type {Array>} + * @type {Y.Array} */ const array0 = /** @type {any} */ (init(tc, { users: 3 }).array0) const undoManager = new Y.UndoManager(array0, { deleteFilter: item => !(item instanceof Y.Item) || (item.content instanceof Y.ContentType && item.content.type._map.size === 0) }) diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index 6bbaf69c..3776077c 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -563,7 +563,7 @@ const arrayTransactions = [ return } const pos = prng.int32(gen, 0, yarray.length - 1) - const len = 1 // prng.int32(gen, 1, math.min(3, yarray.length - pos)) @todo! + const len = prng.int32(gen, 1, math.min(1, yarray.length - pos)) const _newPosAdj = prng.int32(gen, 0, yarray.length - len) // make sure that we don't insert in-between the moved range const newPos = _newPosAdj + (_newPosAdj > yarray.length - len ? len : 0)