ava incorrectly ignores test files when the project itself is contained in node_modules directory
See original GitHub issueDescription
I have two projects:
Due to the nature of the projects (process.pwd()
aware dependency resolution), it is not possible to link isomorphic-webpack-demo
inside isomorphic-webpack
. Therefore, I need to do:
git clone https://github.com/gajus/isomorphic-webpack
git clone https://github.com/gajus/isomorphic-webpack-demo
(cd ./isomorphic-webpack && npm install)
(cd ./isomorphic-webpack-demo && npm install)
rm -fr ./isomorphic-webpack-demo/node_modules/isomorphic-webpack
cp ./isomorphic-webpack ./isomorphic-webpack-demo/node_modules
The problem happens when I try to run ava
inside of isomorphic-webpack
, i.e.
cd ./isomorphic-webpack-demo/node_modules/isomorphic-webpack
npm run test
I am getting error:
1 exception
✖ Couldn't find any files to test
My guess (without looking at the source code), is that ava
detects that ./isomorphic-webpack-demo/node_modules/isomorphic-webpack/test
path includes node_modules
and therefore ignores this path.
Expected behaviour: ava should detect the immediate ./test
directory and run the tests.
Environment
node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"
ava --version
npm --version
Node.js v7.3.0
darwin 16.3.0
0.17.0
3.10.10
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ava - npm
Directories are recursed, with all *.js files being treated as test files. Directories named fixtures , helpers and node_modules are always ...
Read more >Ava js not executing tests - Stack Overflow
0 all my tests are executing fine, I have a ts project a compile to js and execute all js test files. When...
Read more >Debug Node.js Apps using Visual Studio Code
Mocha Tests: Debug mocha tests in a test folder of your project. Make sure that your project has 'mocha' installed in its node_modules...
Read more >The compiler for next generation JavaScript - Babel.js
While you can install Babel CLI globally on your machine, it's much better to install it locally project by project. There are two...
Read more >Documentation - Module Resolution - TypeScript
The behavior Node.js takes will differ depending on if require is given a relative ... A node_modules folder can be on the same...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Jolo510 actually I need to review the various globbing issues. I suggest you hold off until then. I think we may need a more comprehensive approach.
Hey @novemberborn, I new to open source and Ava. Would this be a good first bug to tackle?