Skip to content

Commit f16b78e

Browse files
committed
fix(tests): Fix expectTreeEqual when checkOrder=false
Signed-off-by: Marcel Klehr <[email protected]>
1 parent d0eb476 commit f16b78e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ let expectTreeEqualRec = function(tree1, tree2, recDepth, ignoreEmptyFolders, ch
3030
tree2.children.sort((a, b) => {
3131
if (a.title < b.title) return -1
3232
if (a.title > b.title) return 1
33+
if ((a.url || '') < (b.url || '')) return -1
34+
if ((a.url || '') > (b.url || '')) return 1
3335
return 0
3436
})
3537
tree1.children.sort((a, b) => {
3638
if (a.title < b.title) return -1
3739
if (a.title > b.title) return 1
40+
if ((a.url || '') < (b.url || '')) return -1
41+
if ((a.url || '') > (b.url || '')) return 1
3842
return 0
3943
})
4044
}

0 commit comments

Comments
 (0)