by Allen K Williams
- Backend
from the top level directory,
cd backend && npm install
- Frontend
from the top level directory,
cd frontend && npm install
- Navigate to
backend
directory and runnpm run start
if you would like for the app to write to the
todos.json
file, instead, runyarn start:persist
- in a separate terminal window, navigate to the
frontend
directory and runnpm run start
this will open a webpage. - once the Metro Bundler and Tunnel are ready, click 'Run in iOS simulator' to open an ios simulator
- Backend: in the
backend
directory, runnpm run test
- styling in Add New Todo Modal
- Date time setting in Add New Todo Modal
When time to write tests is limited, unit tests should focus on ensuring that the interfaces between parts of the app should work. In this project the API is the contract between the backend and the frontend. There are a number of things that could go wrong as these apps communicate (server configuration, network errors, firewalls, etc). So unit tests should aim to reduce the problem space, to allow us to identify whether the problem is on the backend, on the frontend, or in between.
Added a test for the DELETE
endpoint because it's a destructive operation, and we should always ensure that 1. it deletes a todo and 2. it deletes the correct todo.