- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
This looks a bit like the old Angular pregenerated tests, and (at least in Angular) actually DO test something: that injections has been configured properly.
Now (in Angular) you're supposed to configure the testbed separately, instead of using the project configuration, so all you are really testing is still your test setup.
Admin
Actually, such tests do serve a purpose: in TDD, you are writing a test before any code, and this test then obviously and immediately fails because there is no such module. Then you are writing the code itself, and as soon as the module exists, the test succeeds, and you have verified a number of things:
No WTF at all IMO.
Edit Admin
Having worked with buggy (or at least ill-documented) frameworks in the days before unit testing was commonplace, one heck of a lot of discovery about the framework occurred via debugging hard-to-reproduce bugs.
Had unit test harnesses existed then I could see spending about 6 man-months building tests to explore the framework's corner cases. Not that we could fix any of them, but at least we'd learn which cases to code around.
Admin
Yea. If I had a cent for every time I had to figure out the bugs and edge cases of a supposedly working API the hard way and code around them I'd have enough to retire. Well, I am retired, kind of. But I could retire again.