Conversation
|
better? |
|
Which tests are validating the |
|
That is the question I actually ask in my first comment. I wrote the unit tests and it does behave now like @mohd-akram s code change. But the question is, does it really fix it? I have actually no clue, as I personally dont use submodules. And how should I check in an integration test into git/github, when I have to basically have to patch .git folder etc.. |
I think the only real way to test this whole module is through integration tests. Those would be done via a Docker container. The steps would be something like:
|
This is based on #55 by @mohd-akram
But I am actually not convinced, that it does what it should.
Why do we go recursively till to the root when searching for the git folder?! I actually would expect to drill down. But still, it means, that if somebody has a .git-folder in his root folder, that we will process it. Smells very fishy.
I changed the behaviour slightly: If the found path is not a folder, it will return null and not the path.
Checklist
npm run testandnpm run benchmarkand the Code of conduct