{"action":"created","issue":{"url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/2","labels_url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/2/comments","events_url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/2/events","html_url":"https://github.com/dwyl/learn-pre-commit/issues/2","id":84503478,"number":2,"title":"TDD seems more difficult with client-side pre-commit hooks","user":{"login":"rjmk","id":12041390,"avatar_url":"https://avatars.githubusercontent.com/u/12041390?v=3","gravatar_id":"","url":"https://api.github.com/users/rjmk","html_url":"https://github.com/rjmk","followers_url":"https://api.github.com/users/rjmk/followers","following_url":"https://api.github.com/users/rjmk/following{/other_user}","gists_url":"https://api.github.com/users/rjmk/gists{/gist_id}","starred_url":"https://api.github.com/users/rjmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjmk/subscriptions","organizations_url":"https://api.github.com/users/rjmk/orgs","repos_url":"https://api.github.com/users/rjmk/repos","events_url":"https://api.github.com/users/rjmk/events{/privacy}","received_events_url":"https://api.github.com/users/rjmk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-03T11:21:08Z","updated_at":"2016-01-28T17:50:41Z","closed_at":null,"body":"Hi,\r\n\r\nDo you have any advice for integrating TDD with pre-commit hooks? Obviously in some ways they work together, but not being able to commit with 'fatally' failing tests seems to make things quite difficult.\r\n\r\nFor example, before I start writing a function I write a test for it:\r\n\r\n```javascript\r\nassert.equal(newFunc(param), 'correct string');\r\n```\r\n\r\nThe rest of my test files won't run after this and my hooks may stop me from committing. I'm sure there's a sensible workflow around this, but I'm not sure what it is.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/comments/176303611","html_url":"https://github.com/dwyl/learn-pre-commit/issues/2#issuecomment-176303611","issue_url":"https://api.github.com/repos/dwyl/learn-pre-commit/issues/2","id":176303611,"user":{"login":"nelsonic","id":194400,"avatar_url":"https://avatars.githubusercontent.com/u/194400?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonic","html_url":"https://github.com/nelsonic","followers_url":"https://api.github.com/users/nelsonic/followers","following_url":"https://api.github.com/users/nelsonic/following{/other_user}","gists_url":"https://api.github.com/users/nelsonic/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonic/subscriptions","organizations_url":"https://api.github.com/users/nelsonic/orgs","repos_url":"https://api.github.com/users/nelsonic/repos","events_url":"https://api.github.com/users/nelsonic/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonic/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T17:50:41Z","updated_at":"2016-01-28T17:50:41Z","body":"@rjmk *sorry* I did not see this ... :disappointed: (*GitHub notification fail...*)\r\nIn *general* we encourage people to *not* commit tests that are not passing unless its the *end* of the day and your brain is fried from a day of debugging, then as a last resort:\r\n```js\r\ngit commit -m '[WiP] :negative_squared_cross_mark: add (*failing*) test for amazing feature. code to pass to follow shortly' -n`\r\n```\r\nProvided its on a branch having a `[WiP]` commit message makes it pretty clear to the rest of your team that the code is incomplete. and in ***only*** this case, we would *skip* the pre-commit hooks using the `-n` flag.\r\n\r\nWhat workflow did *you* end up adopting for committing non-passing code...?"}}