Skip to content

Commit

Permalink
add vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
drondiodev committed Jul 22, 2024
1 parent cad3ce4 commit e250f45
Show file tree
Hide file tree
Showing 4 changed files with 1,471 additions and 33 deletions.
10 changes: 10 additions & 0 deletions app/page.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable import/no-extraneous-dependencies */
import { render, screen } from '@testing-library/react'
import { expect, test } from 'vitest'

import Page from './page'

test('Page', () => {
render(<Page />)
expect(screen.getByRole('heading', { level: 1, name: 'Home' })).toBeDefined()
})
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "vitest --no-watch",
"prepare": "husky",
"preinstall": "npx only-allow pnpm",
"commit": "./node_modules/cz-customizable/standalone.js"
Expand All @@ -18,21 +19,25 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^14.2.4",
"@testing-library/react": "^16.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@vitejs/plugin-react": "^4.3.1",
"cz-customizable": "^7.0.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "14.2.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"jsdom": "^24.1.1",
"lint-staged": "^15.2.7",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5",
"vitest": "^2.0.4"
},
"config": {
"cz-customizable": {
Expand Down
Loading

0 comments on commit e250f45

Please sign in to comment.