Hacker News new | ask | show | jobs
by ThrowawayR2 3045 days ago
> It takes about 2 hours to learn how to write unit tests for someone who has never done it.

If it's really that trivial, the developer should be doing it so routinely that it should take less than 15 minutes to write unit tests for the take home exercise. Your statement literally demolishes any excuse for not doing it.

1 comments

Good unit tests themselves, if you have good coverage, usually take longer than writing the code. But you knew that right?
> Good unit tests themselves, if you have good coverage, usually take longer than writing the code. But you knew that right?

All too well, my friend. That is why the employer is justified in asking for a demonstration of the ability to write good unit tests, as you have demonstrated by your own admission.

He said if the user didn't use factories for test data, it would be a huge red flag.

According to him, if I didn't setup a factory, when doing a take home assignment, then I'm not competent to write unit tests. I disagree.

So many people interview poorly. It's gotten worse every time I read about it. They're pushing away talent that way. I know people are stuck in their ways, but it's a bad idea unless you are are just looking for juniors and people desperate enough to go through that. I'm neither.

I mean don't people realize it's a seller's market?