-
npm i
to install all dependencies -
npm run dev
starts the Next.js development server at http://localhost:3000 -
npm run test
runs unit and integration tests with Jest -
npm run test:watch
runs Jest in watch mode -
npm run test:ci
runs Jest with coverage report (useful for CI pipelines) -
npx playwright install
installs Playwright browsers (only needed once) -
npm run test:e2e runs all Playwright end-to-end tests
-
npx playwright test e2e/clientPage.spec.ts --headed
runs a specific E2E test file in headed mode (visible browser)
Note
I implemented both document.cookie handling and Next.js server-side cookies in the project. While using document.cookie directly is generally not recommended in real-world, production-grade applications due to security and consistency concerns, I included it here intentionally to demonstrate and showcase my skills with both approaches. This way you can see how I handle cookie management on the client as well as the proper, secure way on the server.