3 ms·
> git commit, which hooked into yarn test There's the real wtf. How are you meant to commit a failing test? Or any other kind of work in progress?
by normie3000 2y ago
> git commit, which hooked into yarn test
There's the real wtf. How are you meant to commit a failing test? Or any other kind of work in progress?
- computerfriend 2y agogit commit -n
- normie3000 2y agoAha! I have a new alias!
- zdragnar 2y agoYou mark the failing test with "failing". The test runner knows that it might fail but doesn't fail the suite. I'm not a big fan of git commit hooks, but it can give faster feedback than waiting for a CI runner to point out something that should have been obvious if you keep it light weight (such as style linting or compiler warnings). Edit: replaced "Todo" with "failing" since we're talking about jest specifically: https://jestjs.io/docs/api#testfailingname-fn-timeout https://jestjs.io/docs/api#testfailingname-fn-timeout