-
Notifications
You must be signed in to change notification settings - Fork 4
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
Changes from 4 commits
f5f6dc4
e868174
55ffa4b
0df661a
b9cd244
479f584
14b1d44
c606ce4
411a789
25f24f6
dde7125
74d1f4c
f5c526b
0337064
9c2bbbf
2a61cc3
3b8f935
c9a4075
2401b0e
97057a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||||||||||||
|
|
||||||||||||
| - name: Install dependencies | ||||||||||||
| run: pnpm install | ||||||||||||
|
|
||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
tho eslint is also in here I guess? do we need both or can we get rid of eslint?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not using eslint in this. I want to do another PR where I set up knip and clean up the dev dependencies
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is said issues and I think I'll make it a fast follow to this PR. Even including the lint check in the PR is going to bloat the diff |
||||||||||||
| - name: Run tests | ||||||||||||
| run: pnpm test | ||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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", | ||||||||
|
|
@@ -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", | ||||||||
|
|
@@ -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" | ||||||||
| } | ||||||||
| } | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
\n
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My editor removes trailing new lines, is there a reason to have it?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. short answer: yes. long answer: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm having some issues with getting helix not to strip the new line. But this will be fixed once this PR is merged
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm. the docs claim that |
||||||||
There was a problem hiding this comment.
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)