• My favorite tests are the tests that check what the function in question does when it’s passed null/wrong type/whatever in a statically typed language.

    The compiler’s there to make sure you don’t do that. Unless it’s something that can actually happen, I don’t think there’s much value writing dozens of these tests for each source file. By all means, test edge cases, but if the edge case violates the contract of the function being tested then I think it’s safe to say the caller is the problem, not the implementation.