-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test for bottom view binary tree #147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @christian-fei can you cover following test cases where Btree is null?
@TheSTL updated the tests, thanks |
btree = new BinaryTree([1, 2, 3, 4, 5, 6]); | ||
}); | ||
|
||
it('Determines the bottom view of a binary tree', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Determines the bottom view of a binary tree' -> Should determines the bottom view of a binary tree
It's all about Behavior Driven Testing, hence it starts with or contains should
it('Determines the bottom view of a binary tree', () => { | ||
expect(bottomView(btree)).toEqual([6, 2, 3, 4]); | ||
}); | ||
it('handles null binary tree', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'handles null binary tree' -> Should handles null binary tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn today how to write unit test title.
Sorry for pointing it out now. @christian-fei
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @christian-fei for PR 💯
this should help with #146
please let me know what you think