Re:40% of the code GitHub Copilot users check-in is AI gener...
by dandellion on Tuesday March 14, 2023 @09:52PM
(#35162674)
In my case about 50% of the test code is just boilerplate, so I usually type the test name and generate the rest. Most of the time I have to rewrite the actual test logic (although very trivial tests are sometimes correct), but I probably keep more than 40% if we're talking tests specifically.
[ Parent
| on HN ]
Re:40% of the code GitHub Copilot users check-in is AI gener...
by paro_nej on Tuesday March 14, 2023 @10:09PM
(#35162800)
> In my case about 50% of the test code is just boilerplate
Why not replace it with a function call?
Re:40% of the code GitHub Copilot users check-in is AI gener...
by travisjungroth on Tuesday March 14, 2023 @10:15PM
(#35162845)
A common occurrence is something like a pool of 10 actions where a bunch of tests each do 3 to 7 of them. This is very hard to abstract with a function call.
Re:40% of the code GitHub Copilot users check-in is AI gener...
by aaomidi on Tuesday March 14, 2023 @10:12PM
(#35162828)
Some languages are just noisy.
Go, Java I’ve experienced are noisier than others.
Re:40% of the code GitHub Copilot users check-in is AI gener...
by lupire on Tuesday March 14, 2023 @11:39PM
(#35163524)
That makes the test harder to read. Tests should be dumb.
Re:40% of the code GitHub Copilot users check-in is AI gener...
by dandellion on Wednesday March 15, 2023 @09:33PM
(#35177060)
In the case I was referring to, mainly to keep the code consistent with what was already there and the PRs small, as the code base is primarily owned by a different team. It's also pretty innocuous short tests that read well as they are.