Remove method with 2 children in binarySearchTree.js is basically updating the key but value still remains the same as the node which needs to be removed is this intended? Check the following snippet
const minRight = this.min(node.getRight());
node.setKey(minRight.getKey());
return this.remove(minRight.getKey(), minRight);