{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/2304","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/2304/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/2304/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/2304/events","html_url":"https://github.com/facebook/jest/issues/2304","id":195057209,"number":2304,"title":"--watch only watch test files","user":{"login":"gghez","id":6266247,"avatar_url":"https://avatars.githubusercontent.com/u/6266247?v=3","gravatar_id":"","url":"https://api.github.com/users/gghez","html_url":"https://github.com/gghez","followers_url":"https://api.github.com/users/gghez/followers","following_url":"https://api.github.com/users/gghez/following{/other_user}","gists_url":"https://api.github.com/users/gghez/gists{/gist_id}","starred_url":"https://api.github.com/users/gghez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gghez/subscriptions","organizations_url":"https://api.github.com/users/gghez/orgs","repos_url":"https://api.github.com/users/gghez/repos","events_url":"https://api.github.com/users/gghez/events{/privacy}","received_events_url":"https://api.github.com/users/gghez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-12T19:03:31Z","updated_at":"2016-12-12T21:14:33Z","closed_at":null,"body":"<!-- *Before creating an issue please make sure you are using the latest version of Jest, try re-installing your node_modules folder and run Jest once with `--no-cache` to see if that fixes the problem you are experiencing.* -->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\n\r\nBug\r\n\r\n**What is the current behavior?**\r\n\r\nWhen I modify source files while running jest command with `--watch` flag it does not re-run tests.\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can `npm install` and `npm test`.**\r\n\r\nI use babel/es6 syntax to import files inside test files. Maybe it does not inspect dependency tree when using such syntax...\r\n\r\n**What is the expected behavior?**\r\n\r\nIt works omfg!\r\n\r\n**Run Jest again with `--debug` and provide the full configuration it prints. Please mention your node and npm version and operating system.**\r\n\r\n```son\r\njest version = 17.0.3\r\ntest framework = jasmine2\r\nconfig = {\r\n  \"testPathDirs\": [\r\n    \"/Users/ohohoh/Projects/npp/test\"\r\n  ],\r\n  \"rootDir\": \"/Users/ohohoh/Projects/npp\",\r\n  \"name\": \"-Users-ohohoh-Projects-npp\",\r\n  \"setupFiles\": [\r\n    \"/Users/ohohoh/Projects/npp/node_modules/babel-polyfill/lib/index.js\"\r\n  ],\r\n  \"testRunner\": \"/Users/ohohoh/Projects/npp/node_modules/jest-jasmine2/build/index.js\",\r\n  \"transform\": [\r\n    [\r\n      \"^.+\\\\.jsx?$\",\r\n      \"/Users/ohohoh/Projects/npp/node_modules/babel-jest/build/index.js\"\r\n    ]\r\n  ],\r\n  \"usesBabelJest\": true,\r\n  \"automock\": false,\r\n  \"bail\": false,\r\n  \"browser\": false,\r\n  \"cacheDirectory\": \"/var/folders/56/4n9k_4k972lcnsz2n56s08mh0000gn/T/jest\",\r\n  \"coveragePathIgnorePatterns\": [\r\n    \"/node_modules/\"\r\n  ],\r\n  \"coverageReporters\": [\r\n    \"json\",\r\n    \"text\",\r\n    \"lcov\",\r\n    \"clover\"\r\n  ],\r\n  \"expand\": false,\r\n  \"globals\": {},\r\n  \"haste\": {\r\n    \"providesModuleNodeModules\": []\r\n  },\r\n  \"mocksPattern\": \"__mocks__\",\r\n  \"moduleDirectories\": [\r\n    \"node_modules\"\r\n  ],\r\n  \"moduleFileExtensions\": [\r\n    \"js\",\r\n    \"json\",\r\n    \"jsx\",\r\n    \"node\"\r\n  ],\r\n  \"moduleNameMapper\": {},\r\n  \"modulePathIgnorePatterns\": [],\r\n  \"noStackTrace\": false,\r\n  \"notify\": false,\r\n  \"preset\": null,\r\n  \"resetMocks\": false,\r\n  \"resetModules\": false,\r\n  \"snapshotSerializers\": [],\r\n  \"testEnvironment\": \"jest-environment-jsdom\",\r\n  \"testPathIgnorePatterns\": [\r\n    \"/node_modules/\"\r\n  ],\r\n  \"testRegex\": \"(/__tests__/.*|\\\\.(test|spec))\\\\.jsx?$\",\r\n  \"testURL\": \"about:blank\",\r\n  \"timers\": \"real\",\r\n  \"transformIgnorePatterns\": [\r\n    \"/node_modules/\"\r\n  ],\r\n  \"useStderr\": false,\r\n  \"verbose\": null,\r\n  \"watch\": false,\r\n  \"cache\": true,\r\n  \"watchman\": true\r\n}\r\n```\r\n\r\n`node --version`: `v6.9.2`\r\n`npm --version`: `3.10.9`\r\n\r\nAll that on MaxOSX"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/266554658","html_url":"https://github.com/facebook/jest/issues/2304#issuecomment-266554658","issue_url":"https://api.github.com/repos/facebook/jest/issues/2304","id":266554658,"user":{"login":"gghez","id":6266247,"avatar_url":"https://avatars.githubusercontent.com/u/6266247?v=3","gravatar_id":"","url":"https://api.github.com/users/gghez","html_url":"https://github.com/gghez","followers_url":"https://api.github.com/users/gghez/followers","following_url":"https://api.github.com/users/gghez/following{/other_user}","gists_url":"https://api.github.com/users/gghez/gists{/gist_id}","starred_url":"https://api.github.com/users/gghez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gghez/subscriptions","organizations_url":"https://api.github.com/users/gghez/orgs","repos_url":"https://api.github.com/users/gghez/repos","events_url":"https://api.github.com/users/gghez/events{/privacy}","received_events_url":"https://api.github.com/users/gghez/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T21:14:33Z","updated_at":"2016-12-12T21:14:33Z","body":"It doesn't because I see with my eyes that JEST test runner is not re-running tests after my changes on source files. But it re-run after changing test files.\r\n\r\nI don't know what is dynamic require, I'm using `import { MyClass } from \"../../../src/MyClass\";` syntax."}}
{"actor":{"display_login":"gghez"}}