Skip to content

chore: setup testing libraries and tests for App.tsx #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use 9 in dogfood (probably soon to be 10)


- name: Install dependencies
run: pnpm install

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Install dependencies
run: pnpm biome check

tho eslint is also in here I guess? do we need both or can we get rid of eslint?

- name: Run tests
run: pnpm test
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"dev": "vite",
"build": "tsc -b && vite build && vite build --mode=client",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch"
},
"dependencies": {
"@fontsource-variable/inter": "^5.2.5",
Expand Down Expand Up @@ -60,6 +65,8 @@
"@biomejs/biome": "2.1.1",
"@eslint/js": "^9.25.0",
"@hono/vite-dev-server": "^0.19.1",
"@testing-library/jest-dom": "^6.6.4",
"@testing-library/react": "^16.3.0",
"@types/lodash": "^4.17.17",
"@types/node": "^22.15.21",
"@types/prismjs": "^1.26.5",
Expand All @@ -73,12 +80,14 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"happy-dom": "^18.0.1",
"postcss": "^8.5.3",
"tailwindcss": "3",
"typescript": "~5.8.3",
"typescript-eslint": "^8.30.1",
"vercel": "^42.3.0",
"vite": "^6.3.5",
"vite-plugin-vercel": "^9.0.7"
"vite-plugin-vercel": "^9.0.7",
"vitest": "^3.2.4"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

\n

Loading