Consumes excessive CPU time with autotest
Opened this issue · 1 comments
The --autotest option seems to have some sort of issue watching my project folder. I suspect it's something to do with the node_modules folder being in the watched path.
My project directory looks like
project
├── README.md
├── app.js
├── helpers.js
├── karma.conf.js
├── package.json
├── node_modules
└── specs
└── helpersSpec.js
And it consumes more and more CPU according to top
until it's at 100% usage with the following commands:
jasmine-node --autotest ./
jasmine-node --autotest specs/ --watch ./
But not with the command:
jasmine-node --autotest specs/
I was able to work around it by refactoring my folders so that I could run it like:
jasmine-node --autotest specs/ --watch src/
But I imagine watching node_modules folders is an undesirable behavior. While throwing source files in the root directory might not be best practice, it is possibly a common use case.
Perhaps a default ignore list like nodemon uses would be useful:
Note that by default, nodemon will ignore the
.git
,node_modules
,bower_components
and.sass-cache
directories and add your ignored patterns to the list. If you want to indeed watch a directory likenode_modules
, you need to overriding the underlying default ignore rules.
@mhevery, would you consider using watch instead of gaze in autotest.js? watch easily allows ignore patterns...