aleixmorgadas’s avataraleixmorgadas’s Twitter Archive—№ 2,318

                          1. This is the @cognitive_load test suite output. The Side Project I started some months ago 😄 Right now, it's IO-heavy and has little business logic. That's why almost all the tests use @testcontainers -node. A short thread about #TDD + TC 🤓 1/ @aleixmorgadas/1513973774072299521
                            oh my god twitter doesn’t include alt text from images in their API
                        1. …in reply to @aleixmorgadas
                          Here is a little thread about the Architecture 2/ @aleixmorgadas/1558515820090867712
                      1. …in reply to @aleixmorgadas
                        The application right now does straightforward use cases: 👉 Create Organization 👉 Create Teams 👉 Invite Members 👉 View them Indeed, you can see them in the tests 🤣 Here is a screenshot 🖼️ 3/
                        oh my god twitter doesn’t include alt text from images in their API
                    1. …in reply to @aleixmorgadas
                      All those processes are heavy IO. I mainly do: 🧍-> React -> API -> Use Case Layer -> Postgres 💽 Use Case Layer is still quite dummy. Contains some security stuff 🔐👮 4/
                  1. …in reply to @aleixmorgadas
                    To access Postgres, I use knexjs.org. Imagine all the mocking (lines of code) that I could have needed to do! And the little confidence that I would have about it. 💀😥 I didn't know Knex before. Mocking the Knex API meant to learn it completely by trial-error 5/
                1. …in reply to @aleixmorgadas
                  A waste. @testcontainers for rescue! All the costs of the IO test were removed by: postgres = await PostgresContainer.start(); I love this product 🧡 I still think there's a lot of potential to be discovered. Test code 👇 6/ gist.github.com/aleixmorgadas/4dd78b64111a55581ea38d9522f1ef0b
              1. …in reply to @aleixmorgadas
                I can confidently develop my side project using TDD for IO testing, in my case, because it's mainly IO operations. If I didn't have Testcontainers, I either: - Mock everything (it doesn't provide confidence to me) - Don't test A massive game changer. 7/
            1. …in reply to @aleixmorgadas
              But that's not the only thing 😏 I'm using testcontainers.cloud/ which we are developing at @AtomicJarInc. So, I'm using a Cloud solution instead of using my local environment to run all the dockers. How does it feel? 8/
          1. …in reply to @aleixmorgadas
            Multiple points: 1. I can do continuous testing. Executing all the tests all the time to get continuous feedback 2. I don't feel my machine uses much computation. Indeed, it doesn't burn compared to when I ran the tests locally only🤣 3. Works smooth on M1 Smooth testing 🧡 9/
        1. …in reply to @aleixmorgadas
          I can tell that Testcontainers and Testcontainers Cloud do reduce feedback life-cycle and increase the robustness of the application 🚀🤘 ... and my machine doesn't die during the process 🤣 I can continue running Chrome, Slack, Spotify, and VS Code smoothly 💪 10/
      1. …in reply to @aleixmorgadas
        Do you want to test Testcontainers Cloud? Use the Form to ask for Private Beta Access 😄! testcontainers.cloud/ 11/
    1. …in reply to @aleixmorgadas
      Do you want to know more about the Side Project @cognitive_load? Drop me a Direct Message 👍 12/12
  1. …in reply to @aleixmorgadas
    Just understood that maybe a DM is too much. What about subscribing to the news letter? 😊 Look at it as a waiting list ! cognitiveload.substack.com