From a0f0c9c377166f5a29acdbc998562fb7e14fc2f3 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 11 Mar 2019 18:34:50 +0100 Subject: [PATCH] testing: use lib0.testing.compare to compare Maps and sets --- tests/y-map.tests.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index 67da6b89..c8949d6d 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -197,11 +197,7 @@ export const testObserversUsingObservedeep = tc => { // TODO: Test events in Y.Map const compareEvent = (t, is, should) => { for (var key in should) { - if (should[key].constructor === Set) { - t.compare(Array.from(should[key]), Array.from(is[key])) - } else { - t.assert(should[key] === is[key]) - } + t.compare(should[key], is[key]) } }