Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumes excessive CPU time with autotest #389

Open
landretk opened this issue Dec 8, 2015 · 1 comment
Open

Consumes excessive CPU time with autotest #389

landretk opened this issue Dec 8, 2015 · 1 comment

Comments

@landretk
Copy link

landretk commented Dec 8, 2015

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.

@pieterjandesmedt
Copy link

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 like node_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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants