Repository: vercel/next.js
Pull request: Added @types/jest in installtion commands.

<!--
Thanks for opening a PR! Your contribution is much appreciated.  
To make sure your PR is handled as smoothly as possible, please follow the checklist sections below.  
Choose the right checklist for the change(s) you're making:
-->

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.  
- Read the [Docs Contribution Guide](https://nextjs.org/docs/community/contribution-guide) to ensure your contribution follows the docs guidelines.

### Adding or Updating Examples

- Follow the [examples contribution guidelines](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md).
- Ensure linting passes by running `pnpm build && pnpm lint`.  
  See: [Linting Docs](https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md)

### Fixing a Bug

- Link-related issues using `fixes #number`.
- Add relevant tests. See: [Testing Guide](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Ensure errors include helpful links.  
  Reference: [Error Links Guide](https://github.com/vercel/next.js/blob/canary/contributing.md)

### Adding a Feature

- Implements an accepted feature request or RFC.  
  (Ensure there's an approved discussion: [Submit Idea](https://github.com/vercel/next.js/discussions/new?category=ideas))
- Link issues or discussions using `fixes #number`.
- Add e2e tests where appropriate.  
  See: [e2e Testing Guide](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Include updated documentation.
- Add telemetry (if needed) to determine usage.
- Ensure errors have helpful links attached.

---

## For Maintainers

- Provide a minimal, clear description (as if explaining to someone unfamiliar with the context).
- Share Slack thread summaries when referencing discussions.
- Link both Linear (`Fixes NEXT-xxx`) and GitHub issues.
- Leave review comments where the logic behind changes might not be obvious.

---

### What?

Updated documentation and installation instructions to include `@types/jest`.

### Why?

When setting up Jest in a TypeScript project, omitting `@types/jest` causes TypeScript to fall back to `node:test`, leading to incorrect module resolution and runtime errors. Including `@types/jest` resolves this and ensures a smooth development experience.

### How?

Added `@types/jest` to the recommended install commands wherever applicable, ensuring consistent and error-free setup for users following the docs.

Closes `NEXT-`  
Fixes `#`


Changed files:
filename: docs/01-app/03-building-your-application/08-testing/02-jest.mdx
patch: @@ -25,11 +25,11 @@ Since the release of [Next.js 12](https://nextjs.org/blog/next-12), Next.js now
 To set up Jest, install `jest` and the following packages as dev dependencies:
 
 ```bash filename="Terminal"
-npm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node
+npm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node @types/jest
 # or
-yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node
+yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node @types/jest
 # or
-pnpm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node
+pnpm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node @types/jest
 ```
 
 Generate a basic Jest configuration file by running the following command: