A simple task management app to showcase writing tests using React Testing Library (with some bonus content on Cypress Testing Library).
npm i -g pnpm
pnpm i
pnpm run start
The database can be populated with some default data using the script pnpm run populate-db
The array method "toSorted" is used in one of the tests, which is only supported by Node 20+.
Assuming you have NVM installed in your EC2, please run nvm install --lts
. This will install the latest
LTS version of Node (v20 at the time of writing) and use it. If you already have this version installed and
need to change to it run nvm use 20
or nvm use node
or nvm use --lts
To run all tests run pnpm run test
To run a single test file run pnpm run test -- path/to/test
Remember to have the application running via pnpm run server
prior to running Cypress tests
Using a VNC viewer of your choice, head to the root directory of this repo and run pnpm cypress open
From the root directory of this repo, run pnpm cypress run