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

Bug fix: Tree find() didn't look for files deeper than two levels #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iamwilhelm
Copy link

The split() function basically truncated everything after two levels. What we needed to do was to get the head and rest of the path components.

I suppose I could use unshift() here, since doing .join() would be O(n) anyway. Let me know if you think that'd be cleaner to do.

Also, I did write tests for it, but I wasn't able to update the test fixtures appropriately to reflect a deeper dir hierarchy. So while the tests pass, none of the test fixtures have something 3 layers deep. Should I add another one?

@notatestuser
Copy link
Owner

Yes, please cover with tests

@iamwilhelm
Copy link
Author

Right, but how did you edit the test fixtures?

Or did you want me to create a new text fixture for the test?

@notatestuser
Copy link
Owner

#8 has a recommendation with regard to test fixtures if you didn't catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants