{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/222","labels_url":"https://api.github.com/repos/facebook/jest/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/222/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/222/events","html_url":"https://github.com/facebook/jest/issues/222","id":55215661,"number":222,"title":"Jest does not reload test files for TDD using gulp.watch","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars.githubusercontent.com/u/10137?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-22T22:04:55Z","updated_at":"2015-10-16T18:05:56Z","closed_at":"2015-10-16T18:05:55Z","body":"I tried using the following for TDD: \r\nhttps://github.com/iaretiga/gulp-jest-watcher/blob/master/gulpfile.js\r\n\r\nHowever, when I run `gulp tdd` and modify my test js file, the gulp task reruns the test with the first version of the file. That is, if I add or modify tests after `gulp test` has been watched and run once, it will forever return that value.\r\n\r\nCould be a possible issue with global namespace pollution or assuming that the process that runs jest.runCLI will be fresh on every run.\r\n\r\nThe current workaround is to configure `npm test` as shown in the jest documentation and use node's child_process.exec to manually run the `npm test` command as the `gulp test` task."},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/148787676","html_url":"https://github.com/facebook/jest/issues/222#issuecomment-148787676","issue_url":"https://api.github.com/repos/facebook/jest/issues/222","id":148787676,"user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T18:05:55Z","updated_at":"2015-10-16T18:05:55Z","body":"jest now has a `--watch` command."}}