I'd wager the popular engines are well tested because of the number of titles shipped on them not because they have good testing automation - but TBH I haven't worked in this industry for almost 10 years so maybe things changed.
I believe the same is true of "best practice" today: game studios aren't actually behind the curve, you just don't hear much about how things are progressing on this end because most of the conference talks aren't about broad concerns like testing, they're about the myriad specialities of the field.
And there absolutely is a legacy-code thing that hinders AAA in many cases. When the engine is old, that's good, because it's shipped something, but it's bad, because it's using older practices and Things Have Moved On.
Unit tests etc aren't that useful in games so no you won't find much of that stuff.
With everything else being equal Unit tests are as useful for games and game engines as they are for any other type of software. If you care about your software being correct (or let's say less incorrect) you need to test it. And preferably you write automated tests. Games (and especially game engines) aren't really by default an exception to this.
(Of course you can just say that this game is not worth the effort of getting better quality so we don't care if it's a bug fest and that's fine).
Getting a game(or engine) into a particular initial state so you can make the unit test even work would be a massive pain the ass.
Heavy assertions are more useful as they test actual running code, and they are executed every time the program is run. You can still write "unit test" like code using assertions, but having some code that only executes in the development build on startup to check your math library or whatnot.
Not defending Unreal, I don't particularly like that engine, but that has more to do with the codes age and bloat.
It's not hard and definitely not impossible. Just requires a mind set towards quality and testing.
Oh and I spent about 3 years working with UE4. The engine is a bug fest.
You'd be surprised. Here's a talk from Croteam on how they test their games and engine: https://m.youtube.com/watch?v=YGIvWT-NBHk
I'd wager all major engines are exhaustively tested.
Trouble is, there's combinatorial explosion of game state, user input, assets, scripted behaviour and engine, so there's a huge area to cover.