In a way it’s similar to the people who generate #unittests for the code they’ve just written.
Nothing against those who have this big chunk of untested legacy code and happily see that #AI gives them a good starting ground of test cases.
But like with commit messages, unit tests can answer that WHY question about your production code. Why do we need that strange if branch? Oooh because of that edge case occurring in a given use case, tested by this test case over there. That’s something you can’t derive from your production code.
In #TDD, your test cases give your production code a reason to exist. In that sense, you’d be much better off to have AI generate the production code for your tests.