Unverified Commit 126b9c8f authored by Jophy Ye's avatar Jophy Ye Committed by GitHub

Update unit test docs in compliance with testing-library release (#67217)

Co-authored-by: 's avatarJiwon Choi <devjiwonchoi@gmail.com>
Co-authored-by: 's avatarSebastian Silbermann <silbermann.sebastian@gmail.com>
parent 4b7924b1
......@@ -21,13 +21,13 @@ npx create-next-app@latest --example with-vitest with-vitest-app
To manually set up Vitest, install `vitest` and the following packages as dev dependencies:
```bash filename="Terminal"
npm install -D vitest @vitejs/plugin-react jsdom @testing-library/react
npm install -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom
# or
yarn add -D vitest @vitejs/plugin-react jsdom @testing-library/react
yarn add -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom
# or
pnpm install -D vitest @vitejs/plugin-react jsdom @testing-library/react
pnpm install -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom
# or
bun add -D vitest @vitejs/plugin-react jsdom @testing-library/react
bun add -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom
```
Create a `vitest.config.ts|js` file in the root of your project, and add the following options:
......
......@@ -23,11 +23,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/jest-dom
npm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom
# or
yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom
yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom
# or
pnpm install -D jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom
pnpm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom
```
Generate a basic Jest configuration file by running the following command:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment