Full-Stack Application

Prerequisites

  • Node.js (v16+)
  • npm

Backend Setup

  1. Clone the repository
  2. Navigate to backend directory
$ cd test_api
$ npm install
$ npm run start:dev

Frontend Setup

  1. Navigate to frontend directory
cd test_ui
npm install
npm run dev

Running Tests

Backend Tests

  1. Navigate to the backend directory
cd test_api
npm install
  1. Run Jest test
npm run test
  1. Run End-to-End (E2E) tests
npm run test:e2e
  1. Run Cypress tests

Note: Stop any running instances of cypress before switching environments

npm run test:cypress

Frontend Tests

  1. Navigate to the Frontend directory
cd test_ui
npm install
  1. Run Cypress tests

Note: Stop any running instances of cypress before switching environments

npm run dev | npm run dev -- --host  ['to expose port to cypress']
npm run cypress | npx cypress open