Launching tests from a sub-project that doesn't have a gitroot#96
Launching tests from a sub-project that doesn't have a gitroot#96paulRbr wants to merge 2 commits into
Conversation
…it root to find tests
There was a problem hiding this comment.
this looks like an async process, while the previous join() call was sync.
|
Also, all the tests are failing! |
|
Indeed, I'll fix that. Btw, the find method is sync as well |
|
Not sure why the test didn't run. Jshint is reportying errors on a file that I didn't change.. |
|
@popox I can confirm what you just said. It seems that a new version of the linting pkg is more strict. We will have to fix that before looking into your PR. I was able to reproduce this by removing the |
|
Indeed linting is much more strict, you can change the conf via a Juste to confirm, running npm test -fin order to pass the linting errors, makes the tests pass: |
Hello!
I was trying to launch my test suites of a yui project with yogi lately, and had no tests launch. Therefore I took a look inside the test resolver inside yogi. I found out that the current code searches for tests in the
<closest_gitroot>/src/directory.The problem here is that if you have sub-projects inside on git repo, it will search for test at the git root, but not at the package root. Therefor this PR searches for the closest
package.jsonand resolves the base path from there. If no package.json is found, it folds back to the current code (the gitroot).Let me know if this is you'd like to integrate into yogi.