https://github.com/mohamedamineboufares/unit-testing-nextjs
Testing in a Next.js app
https://github.com/mohamedamineboufares/unit-testing-nextjs
cypress end-to-end-testing integration-testing jest nextjs react-testing-library unit-testing
Last synced: about 14 hours ago
JSON representation
Testing in a Next.js app
- Host: GitHub
- URL: https://github.com/mohamedamineboufares/unit-testing-nextjs
- Owner: MohamedAmineBoufares
- License: mit
- Created: 2023-08-19T09:29:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T08:49:27.000Z (over 2 years ago)
- Last Synced: 2025-05-15T09:18:52.762Z (11 months ago)
- Topics: cypress, end-to-end-testing, integration-testing, jest, nextjs, react-testing-library, unit-testing
- Language: TypeScript
- Homepage:
- Size: 380 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testing in Next.js
## Table of contents
- [Testing in Next.js](#testing-in-nextjs)
- [Table of contents](#table-of-contents)
- [General info](#general-info)
- [Technologies](#technologies)
- [Setup](#setup)
- [Licence](#licence)
## General info
A simple project to try different testing types in Next.js.
## Technologies
The project is created with:
- Node.js: 18.17.1
- [pnpm](https://pnpm.io/installation#using-npm): 8.6.12
- Next.js: 13.4.19
- Taliwind CSS: 3.3.3
- Zustand: 4.4.1
- Jest: 29.6.2
- React Testing Library: 14.0.0
- Cypress: 12.17.4
## Setup
To run this project:
1. Install it locally using [pnpm](https://pnpm.io/installation#using-npm)
```bash
pnpm i
```
2. Run the development server:
```bash
pnpm dev
```
3. Run unit tests:
```bash
pnpm test
```
4. Run unit tests with coverage:
```bash
pnpm test:coverage
```
5. Run E2E tests using Cypress:
```bash
pnpm test:e2e
```
**Note:** The coverage report is generated in the `coverage` folder.
## Licence
[MIT licensed](./LICENCE).