Skip to content

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

Open
iamwilhelm wants to merge 2 commits intonotatestuser:masterfrom
cubehero:tree_find
Open

Bug fix: Tree find() didn't look for files deeper than two levels#12
iamwilhelm wants to merge 2 commits intonotatestuser:masterfrom
cubehero:tree_find

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