Skip to content
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

Merged
merged 3 commits into from Oct 26, 2019
Merged

add test for bottom view binary tree #147

merged 3 commits into from Oct 26, 2019

Conversation

@christian-fei
Copy link
Contributor

christian-fei commented Oct 25, 2019

this should help with #146

please let me know what you think

Copy link
Member

TheSTL left a comment

hi @christian-fei can you cover following test cases where Btree is null?

@christian-fei

This comment has been minimized.

Copy link
Contributor Author

christian-fei commented Oct 26, 2019

@TheSTL updated the tests, thanks

btree = new BinaryTree([1, 2, 3, 4, 5, 6]);
});

it('Determines the bottom view of a binary tree', () => {

This comment has been minimized.

Copy link
@TheSTL

TheSTL Oct 26, 2019

Member

'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', () => {

This comment has been minimized.

Copy link
@TheSTL

TheSTL Oct 26, 2019

Member

'handles null binary tree' -> Should handles null binary tree

Copy link
Member

TheSTL left a comment

Learn today how to write unit test title.
Sorry for pointing it out now. @christian-fei

@christian-fei christian-fei force-pushed the christian-fei:master branch from 842238a to 79ac382 Oct 26, 2019
@christian-fei christian-fei requested a review from TheSTL Oct 26, 2019
@TheSTL
TheSTL approved these changes Oct 26, 2019
Copy link
Member

TheSTL left a comment

Thanks @christian-fei for PR 💯

@TheSTL TheSTL merged commit 29b1650 into knaxus:master Oct 26, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.