• Dennis (unregistered)

    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.

  • Marty (unregistered)

    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:

    • a module with the expected name exists
    • the module file is contained in your deployment
    • the module can be instantiated
    • etc.

    No WTF at all IMO.

  • (nodebb)

    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.

  • 516052 (unregistered) in reply to WTFGuy

    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.

Leave a comment on “Module Test”

Log In or post as a guest

Replying to comment #701629:

« Return to Article