Problem when watching files with custom command
See original GitHub issueTestem in development mode performs unexpected behavior when I use watch_files (runs twice and exists)
testem.json
{
"watch_files": [
"./lib/*",
"./lib/**/*",
"./tests/*",
"./tests/**/*"
],
"launchers": {
"Node1": {
"command": "mocha -R tap tests/* tests/**/*",
"protocol": "tap"
},
"Node2": {
"command": "mocha -R tap tests/* tests/**/*",
"protocol": "tap"
}
},
"launch_in_dev": [ "Node1", "Node2" ],
"launch_in_ci": [ "Node1", "Node2" ]
}
Folders structure:
lib folder
lib
├── code
│ └── code.js
└── hello.js
tests folder
tests
├── code
│ └── tests.js
└── tests.js
tests.js looks like this:
ar assert = require('assert');
var hello = require('../lib/hello');
describe('hello', function(){
it('says hello world', function(done){
assert.equal(hello(), 'hello world');
setTimeout(done, 400);
});
it('says hello to person', function(done){
assert.equal(hello('Bob'), 'hello Bob');
setTimeout(done, 400);
});
});
Here is how it works (process stops automatically, I don’t do anything)

Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
webpack custom command on watched files change
You'd want to watch your generated files. Whenever any of the two files changes, it will execute the command.
Read more >Invoke custom command working only first time #892 - GitHub
I set a Windows batch custom command to move and rename the reference files as the duplicate files, with the option Recreate absolute...
Read more >How to automatically watch for file changes and perform a ...
Now make sure that the file /private/var/radmind/client/.radmindOnDemand does exist. Then load the launchagent with command $ launchctl load ~/ ...
Read more >File / Application association using a custom command is gone?
Extending this idea, try creating .desktop files for the mimeopen -a and mimeopen -d commands. This restores the ability to open via a...
Read more >Custom Windows right-click command doesn't execute batch ...
I'm trying to create a custom right-click command which will move a file to a folder. I have a batch file called C:MyMove.bat...
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

@johanneswuerbach https://github.com/gavruk/testem_sample
It might be worth to fork https://github.com/airportyh/fireworm/