Skip to content

Commit 8925628

Browse files
committed
Using the API instead of private props
1 parent b6dc894 commit 8925628

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/data-structures/red-black-tree.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ describe('RBTree', function () {
6060
expect(tree._root._left.isRed()).toBeTruthy();
6161
tree.put(2, 'baz');
6262
expect(tree._root._right).not.toBeNull();
63-
expect(tree._root._right._isRed).toBeFalsy();
63+
expect(tree._root._right.isRed()).toBeFalsy();
6464

6565
tree = new RBTree();
6666
tree.put(1, 'bar');
6767
tree.put(2, 'foo');
6868
tree.put(3, 'baz');
6969
expect(tree._root._right).not.toBeNull();
7070
expect(tree._root._left).not.toBeNull();
71-
expect(tree._root._isRed).toBeFalsy();
72-
expect(tree._root._right._isRed).toBeFalsy();
73-
expect(tree._root._left._isRed).toBeFalsy();
71+
expect(tree._root.isRed()).toBeFalsy();
72+
expect(tree._root._right.isRed()).toBeFalsy();
73+
expect(tree._root._left.isRed()).toBeFalsy();
7474
tree.put(4, 'foobar');
7575
tree.put(5, 'foobar');
7676
expect(tree._root._right._right).not.toBeNull();
77-
expect(tree._root._right._right._isRed).toBeFalsy();
77+
expect(tree._root._right._right.isRed()).toBeFalsy();
7878
});
7979

8080
});

0 commit comments

Comments
 (0)