Andrey (azangru) wrote,
Andrey
azangru

An interesting observation: usually, testing gurus suggest (at least for unit tests) to have only one assertion per test — to make it easier to identify why exactly a test failed; but here, Kent C. Dodds is arguing for the opposite case, because he is using Jest as a test runner, and Jest would point out the exact line where the error inside the test occurred. So if one was splitting their tests artificially, just to follow the one expect per test rule, there is no longer a reason for doing so:



It's about as mindblowing as Evan Czaplicki's statement in one of his Elm talks, where he said that he prefers having longer files instead of splitting them into smaller and more focused files, because Elm's type system helps him focus on the relevant parts on the file anyway, without having to keep in mind everything that's going on in the file.
Subscribe

  • (no subject)

    (retweeted by a developer) How does she interpret what she has highlighted — "unlawful blocking of a public street" — as "pedestrians whose…

  • (no subject)

    Google has finally become ready to promote its Lit ecosystem properly. I thought they were going make their announcements at the coming Google IO;…

  • (no subject)

    Is it ... Bill Maher? Is he, in the penetrating eyes of this insightful lady, the emblem of white supremacy now? The comments to the tweet say it…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments