mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
bdfa37cd4d
This example show how you can test Next.js apps with [react-testing-library](https://github.com/kentcdodds/react-testing-library). This library encourages your applications to be more accessible and allows you to get your tests closer to using your components the way a user will, which allows your tests to give you more confidence that your application will work when a real user uses it. And also, is a replacement for enzyme. <img width="733" alt="Image showing the words next.js + react testing library" src="https://user-images.githubusercontent.com/4689228/50387208-40223200-06de-11e9-9358-607092eb25a0.png">
20 lines
367 B
JSON
20 lines
367 B
JSON
{
|
|
"name": "with-jest-react-testing-library",
|
|
"version": "1.0.0",
|
|
"dependencies": {
|
|
"next": "latest",
|
|
"react": "latest",
|
|
"react-dom": "latest"
|
|
},
|
|
"devDependencies": {
|
|
"react-testing-library": "^5.4.2",
|
|
"jest": "^23.6.0"
|
|
},
|
|
"scripts": {
|
|
"test": "jest",
|
|
"dev": "next",
|
|
"build": "next build",
|
|
"start": "next start"
|
|
}
|
|
}
|