Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: add test for all-words-in-tree #148

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

Merged
ashokdey merged 1 commit into knaxus:master from ChristieRobson:test/all-words-in-trie
Oct 28, 2019

Conversation

Copy link
Contributor

@ChristieRobson ChristieRobson commented Oct 26, 2019

Added test, see issue #144

ashokdey reacted with thumbs up emoji
Copy link
Member

TheSTL commented Oct 26, 2019

Hi @ChristieRobson your commits are not displayed, setup local git properly and push again.

Copy link
Contributor Author

ChristieRobson commented Oct 26, 2019
edited
Loading

Hi @ChristieRobson your commits are not displayed, setup local git properly and push again.

@TheSTL I'm confused what you mean by this, could you please elaborate? In the PR I can see one commit and 1 file showing as being changed.

Copy link
Member

Thanks for your contribution @ChristieRobson, however, the same rules apply here. Please go through my comment in #149

Copy link
Member

@ashokdey ashokdey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #149

Comment on lines 37 to 60
it('passing an empty Trie will throw an error ', () => {
const trie = new Trie();
expect(() => {
allWordsInTrie(trie);
}).toThrow('Cannot read property \'0\' of undefined');
});

it('passing an empty array will throw an error ', () => {
expect(() => {
allWordsInTrie([]);
}).toThrow('Cannot read property \'0\' of undefined');
});

it('passing null will throw an error ', () => {
expect(() => {
allWordsInTrie([]);
}).toThrow('Cannot read property \'0\' of undefined');
});

it('passing an array not in a Trie will throw an error ', () => {
expect(() => {
allWordsInTrie(['bed', 'ball', 'apple']);
}).toThrow('Cannot read property \'0\' of undefined');
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see you @ChristieRobson, you seem to be a quick learner. I appreciate your efforts and I will encourage you to pick more issues from the pool.

For the above selected chunk of code, please follow the same instructions given in #149

Copy link
Contributor Author

@ChristieRobson ChristieRobson Oct 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests updated with specifc error

Copy link
Member

Good work @ChristieRobson 🎉

Do star the repo if you liked working on it and also share it with the world. Thanks

@ashokdey ashokdey merged commit 504d873 into knaxus:master Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ashokdey ashokdey ashokdey approved these changes

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /