Skip to content

Commit

Permalink
Merge pull request #36 from matheusOliv23/config/add-vitest
Browse files Browse the repository at this point in the history
Config/configurando vitest
  • Loading branch information
mffonseca authored Jul 28, 2024
2 parents af3687e + e56cd87 commit bac8236
Show file tree
Hide file tree
Showing 6 changed files with 9,024 additions and 7 deletions.
17 changes: 13 additions & 4 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"extends": [
"next/core-web-vitals",
"plugin:storybook/recommended"
]
"extends": ["next/core-web-vitals", "plugin:storybook/recommended"],
"rules": {
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
]
}
}
2 changes: 2 additions & 0 deletions frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { Preview } from '@storybook/react'
import 'tailwindcss/tailwind.css'


const preview: Preview = {
parameters: {
Expand Down
12 changes: 9 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
"start": "next start",
"lint": "next lint",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"test": "vitest"
},
"dependencies": {
"axios": "^1.7.2",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.52.1",
"react-icons": "^5.2.1",
"zod": "^3.23.8"
},
"devDependencies": {
Expand All @@ -28,18 +30,22 @@
"@storybook/nextjs": "^8.2.5",
"@storybook/react": "^8.2.5",
"@storybook/test": "^8.2.5",
"@testing-library/react": "^16.0.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8",
"eslint-config-next": "14.2.5",
"eslint-plugin-storybook": "^0.8.0",
"jsdom": "^24.1.1",
"postcss": "^8",
"storybook": "^8.2.5",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5",
"vitest": "^2.0.4"
},
"engines": {
"node": ">=18.17.0"
}
}
}
9 changes: 9 additions & 0 deletions frontend/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'

export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
},
})
1 change: 1 addition & 0 deletions frontend/vitest.setup.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom/vitest';
Loading

0 comments on commit bac8236

Please sign in to comment.