testing: use lib0.testing.compare to compare Maps and sets
This commit is contained in:
parent
95ec2a435a
commit
a0f0c9c377
@ -197,11 +197,7 @@ export const testObserversUsingObservedeep = tc => {
|
|||||||
// TODO: Test events in Y.Map
|
// TODO: Test events in Y.Map
|
||||||
const compareEvent = (t, is, should) => {
|
const compareEvent = (t, is, should) => {
|
||||||
for (var key in should) {
|
for (var key in should) {
|
||||||
if (should[key].constructor === Set) {
|
t.compare(should[key], is[key])
|
||||||
t.compare(Array.from(should[key]), Array.from(is[key]))
|
|
||||||
} else {
|
|
||||||
t.assert(should[key] === is[key])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user