• breadsmasher@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 month ago

    Ah! That’s what I didn’t understand. So its not a container for executing unit tests. Its a container for dependencies to support unit tests. That is not clear from the readme unless I missed something

    edit - the title could be “Self terminating containers for real world dependencies to support your unit tests”

    • akash_rawal@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Thanks man, my brain was short-circuited on Testcontainers so I couldn’t write better. Also I am stealing the title.

    • MagicShel@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      This feels more like an integration test than a unit test to me. Maybe that’s not an important distinction to make, but it feels like it would also help communicate intent.

      • Adam@doomscroll.n8e.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        I’m reading this scratching my head going “If your unit tests need a database they ain’t a unit test”.