A React TS + Vite frontend for Y.
Ensure you have the following installed on your machine:
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Access to NTNU's network
- Clone the repository:
git clone https://git.ntnu.no/IT2810-H24/T06-Project-2 cd T06-Project-2/frontend - Install dependencies:
npm install
Start the development server with:
npm run devnpm install
og
npm run dev
The project includes unit and integration tests. To run tests, execute the following command:
npm run testTests are organized by components, with each component having its own test file. For example:
- Footer component tests: test/components/Footer.test.tsx
- LoginForm component tests: test/components/LoginForm.test.tsx
- Navbar component tests, including:
- Dropdown menu: test/components/Navbar/DropdownMenu.test.tsx
- Navbar itself: test/components/Navbar/Navbar.test.tsx
- Theme toggle: test/components/Navbar/ThemeToggle.test.tsx
- Post component tests, including:
- Post body: test/components/Post/PostBody.test.tsx
- Post content: test/components/Post/PostContent.test.tsx
Additional setup configurations are in test/setup.ts.