Working on this now. Not sure what a unit test for `pathToInstalledPackage`
that mocks `resolve` would accomplish, since most of the functionality that
needs to be tested depends on the way `resolve` works.
I have in mind an "integration" test that creates this directory structure:
```
tmpdir/
node_modules/
dummy-local-plugin/
nested-directory/
```
And then tries to run pathToInstalledPackage to find `dummy-local-plugin` from
'tmpdir' and then from 'tmpdir/nested-directory'.
What do you think?
**Update:** Committed a version of this. Verified locally that the new tests
fail on master. The first test succeeds because it tests finding the package in
the current directory, which already worked.
[ Full content available at: https://github.com/apache/cordova-fetch/pull/44 ]
This message was relayed via gitbox.apache.org for [email protected]