{"action":"opened","issue":{"url":"https://api.github.com/repos/testem/testem/issues/812","repository_url":"https://api.github.com/repos/testem/testem","labels_url":"https://api.github.com/repos/testem/testem/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/testem/testem/issues/812/comments","events_url":"https://api.github.com/repos/testem/testem/issues/812/events","html_url":"https://github.com/testem/testem/issues/812","id":137627744,"number":812,"title":"Problem when watching files in custom command","user":{"login":"gavruk","id":507195,"avatar_url":"https://avatars.githubusercontent.com/u/507195?v=3","gravatar_id":"","url":"https://api.github.com/users/gavruk","html_url":"https://github.com/gavruk","followers_url":"https://api.github.com/users/gavruk/followers","following_url":"https://api.github.com/users/gavruk/following{/other_user}","gists_url":"https://api.github.com/users/gavruk/gists{/gist_id}","starred_url":"https://api.github.com/users/gavruk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavruk/subscriptions","organizations_url":"https://api.github.com/users/gavruk/orgs","repos_url":"https://api.github.com/users/gavruk/repos","events_url":"https://api.github.com/users/gavruk/events{/privacy}","received_events_url":"https://api.github.com/users/gavruk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-01T16:49:20Z","updated_at":"2016-03-01T16:49:20Z","closed_at":null,"body":"Testem in development mode performs unexpected behavior (runs twice and exists)\r\n\r\n`testem.json`\r\n```\r\n{\r\n  \"watch_files\": [\r\n    \"./lib/*\",\r\n    \"./lib/**/*\",\r\n    \"./tests/*\",\r\n    \"./tests/**/*\"\r\n  ],\r\n  \"launchers\": {\r\n    \"Node1\": {\r\n      \"command\": \"mocha -R tap tests/* tests/**/*\",\r\n      \"protocol\": \"tap\"\r\n    },\r\n    \"Node2\": {\r\n      \"command\": \"mocha -R tap tests/* tests/**/*\",\r\n      \"protocol\": \"tap\"\r\n    }\r\n  },\r\n  \"launch_in_dev\": [ \"Node1\", \"Node2\" ],\r\n  \"launch_in_ci\": [ \"Node1\", \"Node2\" ]\r\n}\r\n```\r\nFolders structure:\r\n\r\n`lib` folder\r\n```\r\nlib\r\n├── code\r\n│   └── code.js\r\n└── hello.js\r\n```\r\n`tests` folder\r\n```\r\ntests\r\n├── code\r\n│   └── tests.js\r\n└── tests.js\r\n```\r\n`tests.js` looks like this:\r\n```\r\nar assert = require('assert');\r\nvar hello = require('../lib/hello');\r\n\r\ndescribe('hello', function(){\r\n    it('says hello world', function(done){\r\n        assert.equal(hello(), 'hello world');\r\n        setTimeout(done, 400);\r\n    });\r\n    it('says hello to person', function(done){\r\n        assert.equal(hello('Bob'), 'hello Bob');\r\n        setTimeout(done, 400);\r\n    });\r\n});\r\n```\r\n\r\nHere is how it works (process stops automatically, I don't do anything)\r\n![testem](https://cloud.githubusercontent.com/assets/507195/13434288/63b7f172-dfe6-11e5-98ca-e682fa9bee42.gif)\r\n"}}