From 89b4320a8e7b424ffe1c281a38468891079ac70d Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 2 Aug 2021 16:20:01 +0200 Subject: [PATCH] fix test in #310 --- tests/y-xml.tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/y-xml.tests.js b/tests/y-xml.tests.js index 13fa052d..3a5c12a4 100644 --- a/tests/y-xml.tests.js +++ b/tests/y-xml.tests.js @@ -151,11 +151,10 @@ export const testInsertafter = tc => { }) } - /** * @param {t.TestCase} tc */ - export const testClone = tc => { +export const testClone = tc => { const ydoc = new Y.Doc() const yxml = ydoc.getXmlFragment() const first = new Y.XmlText('text') @@ -165,6 +164,7 @@ export const testInsertafter = tc => { t.compareArrays(yxml.toArray(), [first, second, third]) const cloneYxml = yxml.clone() + ydoc.getArray('copyarr').insert(0, [cloneYxml]) t.assert(cloneYxml.length === 3) - t.assert(cloneYxml.toJSON() === yxml.toJSON()) + t.compare(cloneYxml.toJSON(), yxml.toJSON()) }