testing: use lib0.testing.compare to compare Maps and sets

This commit is contained in:
Kevin Jahns 2019-03-11 18:34:50 +01:00
parent 95ec2a435a
commit a0f0c9c377

View File

@ -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])
}
}