A small startup aims to serve up searchable, filterable list of movies via their app. The CTO, their only founding engineer, builds a database schema and seeds a Postgres database with some sample records. Now, we need a Node/Express API built to interact with this database and serve data to the frontend application.
We can offload this task to EngineerDAO. Let's define some requirements:
Our CTO wants full test coverage, but instead of outsourcing that task - they opt to write tests upfront (ala. TDD.) These tests can now be used as acceptance criteria! In the most rigorous implementation of the EngineerDAO philosophy, we could actually create a containerized testing environment that runs the code upon contract submission, and auto-accepts the submission based on passing tests. Here's how this might look:
npm run test
command that runs tests against a given index.js
.Awesome! This is [robot mode]. Realizing that many tasks are difficult to thoroughly test in this manner, we'll offer an alternative that relies upon supplier verification.