Fix naming in binary search tree test.

This commit is contained in:
Oleksii Trekhleb
2018-05-31 06:23:51 +03:00
parent b62d9a43b4
commit c18fd63a53

View File

@ -48,7 +48,7 @@ describe('BinarySearchTree', () => {
});
it('should insert object values', () => {
const nodeValueComparatorCallback = (a, b) => {
const nodeValueCompareFunction = (a, b) => {
const normalizedA = a || { value: null };
const normalizedB = b || { value: null };
@ -63,7 +63,7 @@ describe('BinarySearchTree', () => {
const obj2 = { key: 'obj2', value: 2, toString: () => 'obj2' };
const obj3 = { key: 'obj3', value: 3, toString: () => 'obj3' };
const bst = new BinarySearchTree(nodeValueComparatorCallback);
const bst = new BinarySearchTree(nodeValueCompareFunction);
bst.insert(obj2);
bst.insert(obj3);