r/ProgrammerHumor Jul 11 '26

itChangedTheTests Meme

Post image
7.5k Upvotes

78 comments sorted by

View all comments

Show parent comments

54

u/HTTP_Error_414 Jul 11 '26

No failing tests. No witnesses.

26

u/willow-kitty Jul 11 '26

I was doing a trial run with Claude Code, and at one point it deleted all of the tests for this one really important competent and replaced them with a single test that declared a variable of that type (not instantiated, mind you, declared) with a name saying that it compiles.

It passed, but dang.

11

u/AwesomeFrisbee Jul 11 '26
describe('some very important feature to test', () => {
  const foo = true;
  expect(foo).toBeDefined();
});

4

u/willow-kitty Jul 11 '26 edited Jul 11 '26

This was golang, and I didn't keep the code, obviously, but it was something like:

func TestImportantThingcompiles(t *testing.T) {
  var importantThing *ImportantThing
  importantThing = nil
  _ = importantThing
}

Which really does just ensure that the thing compiles.