Skip to content

Commit e69402b

Browse files
chore: React Test Library experiments app (#1447)
* chore: React Test Library experiments app * chore: fix lint * chore: fix tests
1 parent fd08a4c commit e69402b

21 files changed

+5849
-1
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
flow-typed/
22
build/
3+
experiments-rtl/

experiments-rtl/.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
"@babel/preset-typescript",
4+
"@babel/preset-react",
5+
"@babel/preset-env"
6+
],
7+
"plugins": []
8+
}

experiments-rtl/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

experiments-rtl/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

experiments-rtl/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
```
14+
15+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16+
17+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
18+
19+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
20+
21+
## Learn More
22+
23+
To learn more about Next.js, take a look at the following resources:
24+
25+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
28+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29+
30+
## Deploy on Vercel
31+
32+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33+
34+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

experiments-rtl/jest-setup.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import "@testing-library/jest-dom";

experiments-rtl/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
testEnvironment: "jsdom",
3+
setupFilesAfterEnv: ["<rootDir>/jest-setup.js"],
4+
};

experiments-rtl/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {}
3+
4+
module.exports = nextConfig

experiments-rtl/package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "react-testing-library-experiments",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"test": "jest",
10+
"lint": "next lint"
11+
},
12+
"dependencies": {
13+
"@types/node": "20.4.9",
14+
"@types/react": "18.2.19",
15+
"@types/react-dom": "18.2.7",
16+
"autoprefixer": "10.4.14",
17+
"eslint": "8.46.0",
18+
"eslint-config-next": "13.4.13",
19+
"next": "13.4.13",
20+
"postcss": "8.4.27",
21+
"react": "18.2.0",
22+
"react-dom": "18.2.0",
23+
"tailwindcss": "3.3.3",
24+
"typescript": "5.1.6"
25+
},
26+
"devDependencies": {
27+
"@babel/preset-env": "^7.22.10",
28+
"@babel/preset-react": "^7.22.5",
29+
"@babel/preset-typescript": "^7.22.5",
30+
"@testing-library/jest-dom": "^5.17.0",
31+
"@testing-library/react": "^14.0.0",
32+
"@testing-library/user-event": "^14.4.3",
33+
"@types/jest": "^29.5.3",
34+
"jest": "^29.6.2",
35+
"jest-environment-jsdom": "^29.6.2",
36+
"prettier": "^3.0.1"
37+
}
38+
}

experiments-rtl/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

0 commit comments

Comments
 (0)