{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/238","repository_url":"https://api.github.com/repos/airbnb/enzyme","labels_url":"https://api.github.com/repos/airbnb/enzyme/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/238/comments","events_url":"https://api.github.com/repos/airbnb/enzyme/issues/238/events","html_url":"https://github.com/airbnb/enzyme/issues/238","id":138852869,"number":238,"title":"shallow() does not seem to be updating the code of the component with mocha and --watch","user":{"login":"tomasfejfar","id":642928,"avatar_url":"https://avatars.githubusercontent.com/u/642928?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasfejfar","html_url":"https://github.com/tomasfejfar","followers_url":"https://api.github.com/users/tomasfejfar/followers","following_url":"https://api.github.com/users/tomasfejfar/following{/other_user}","gists_url":"https://api.github.com/users/tomasfejfar/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasfejfar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasfejfar/subscriptions","organizations_url":"https://api.github.com/users/tomasfejfar/orgs","repos_url":"https://api.github.com/users/tomasfejfar/repos","events_url":"https://api.github.com/users/tomasfejfar/events{/privacy}","received_events_url":"https://api.github.com/users/tomasfejfar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-07T00:12:59Z","updated_at":"2016-03-07T10:37:06Z","closed_at":null,"body":"I couldn't think about a way to describe this without the visual, so I created a gif screencap (description below) :) \r\n![mocha](https://cloud.githubusercontent.com/assets/642928/13558235/9058502c-e3f7-11e5-9f2a-07e3045359ce.gif)\r\n\r\nI first added \"test\" to the text in button. But the test didn't fail. Then I changed the props in test. That failed the test. So it's obvious that it's called. But when I return back to previous value (and the test is rerun again) it still does not fail. After then when I close and open the test command it fails. \r\n\r\nSo it seems as if it was caching the react component somehow. Or not clear it between the calls. The commands:\r\n\r\n```\r\n    \"test\": \"mocha --compilers js:babel-core/register --require ./test/test_helper.js test/**/*.*\",\r\n    \"test:watch\": \"npm run test -- --watch\"\r\n```\r\n\r\nAnd test_helper:\r\n```\r\nimport chai from 'chai';\r\nimport chaiImmutable from 'chai-immutable';\r\nimport chaiEnzyme from 'chai-enzyme'\r\n\r\nchai.use(chaiImmutable)\r\n    .use(chaiEnzyme);\r\n```\r\n\r\nI am not sure if this might be mocha issue or something else, but it didn't happen for any tests before I used *enzyme*. I'll be happy to supply more details if needed, but I don't know where to start and how to debug it further. "},"comment":{"url":"https://api.github.com/repos/airbnb/enzyme/issues/comments/193198738","html_url":"https://github.com/airbnb/enzyme/issues/238#issuecomment-193198738","issue_url":"https://api.github.com/repos/airbnb/enzyme/issues/238","id":193198738,"user":{"login":"tomasfejfar","id":642928,"avatar_url":"https://avatars.githubusercontent.com/u/642928?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasfejfar","html_url":"https://github.com/tomasfejfar","followers_url":"https://api.github.com/users/tomasfejfar/followers","following_url":"https://api.github.com/users/tomasfejfar/following{/other_user}","gists_url":"https://api.github.com/users/tomasfejfar/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasfejfar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasfejfar/subscriptions","organizations_url":"https://api.github.com/users/tomasfejfar/orgs","repos_url":"https://api.github.com/users/tomasfejfar/repos","events_url":"https://api.github.com/users/tomasfejfar/events{/privacy}","received_events_url":"https://api.github.com/users/tomasfejfar/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T10:37:06Z","updated_at":"2016-03-07T10:37:06Z","body":"Yes. I have slept on it and I've found the problem. It's beacuse I've never used `*.jsx` files before. I needed to update my test command to \r\n`\"test\": \"mocha --compilers js:babel-core/register --compilers jsx:babel-core/register --watch-ext=jsx --require ./test/test_helper.js test/**/*.*\",` and now it works. So it's completly unrelated to enzyme, sorry :("}}