Skip to content

Commit f496c48

Browse files
committed
fix: solve linting, formatting and ci/cd errors
1 parent 7fccba7 commit f496c48

5 files changed

Lines changed: 36 additions & 28 deletions

File tree

.github/nodejs.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.11.1
1+
v24.3.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ With this template you will get all the boilerplate features included:
3939
* [GitHub Actions](https://github.com/features/actions) - Pre-configured workflows including bundle size and performance tracking
4040
* Perfect Lighthouse score - Optimized performance metrics
4141
* [Bundle analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) - Monitor and manage bundle size during development
42-
* Testing suite - [Jest](https://jestjs.io/), [React Testing Library](https://testing-library.com/react), and [Playwright](https://playwright.dev/) for comprehensive testing
42+
* Testing suite - [Vitest](https://vitest.dev), [React Testing Library](https://testing-library.com/react), and [Playwright](https://playwright.dev/) for comprehensive testing
4343
* [Storybook](https://storybook.js.org/) - Component development and documentation
4444
* Advanced testing - Smoke and acceptance testing capabilities
4545
* [Conventional commits](https://www.conventionalcommits.org/) - Standardized commit history management

components/Button/Button.test.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
1-
import { describe, it, expect } from 'vitest'
2-
import { render, screen } from '@testing-library/react'
3-
import { Button } from './Button'
1+
import { render, screen } from "@testing-library/react"
2+
import { describe, expect, it } from "vitest"
3+
import { Button } from "./Button"
44

5-
describe('Button', () => {
6-
it('renders with children', () => {
5+
describe("Button", () => {
6+
it("renders with children", () => {
77
render(<Button href="/test">Click me</Button>)
8-
expect(screen.getByText('Click me')).toBeInTheDocument()
8+
expect(screen.getByText("Click me")).toBeInTheDocument()
99
})
1010

11-
it('applies correct intent classes', () => {
12-
const { container } = render(<Button href="/test" intent="secondary">Secondary</Button>)
13-
const link = container.querySelector('a')
14-
expect(link).toHaveClass('bg-transparent')
15-
expect(link).toHaveClass('text-blue-400')
11+
it("applies correct intent classes", () => {
12+
const { container } = render(
13+
<Button href="/test" intent="secondary">
14+
Secondary
15+
</Button>
16+
)
17+
const link = container.querySelector("a")
18+
expect(link).toHaveClass("bg-transparent")
19+
expect(link).toHaveClass("text-blue-400")
1620
})
1721

18-
it('applies correct size classes', () => {
19-
const { container } = render(<Button href="/test" size="sm">Small</Button>)
20-
const link = container.querySelector('a')
21-
expect(link).toHaveClass('text-sm')
22-
expect(link).toHaveClass('min-w-20')
22+
it("applies correct size classes", () => {
23+
const { container } = render(
24+
<Button href="/test" size="sm">
25+
Small
26+
</Button>
27+
)
28+
const link = container.querySelector("a")
29+
expect(link).toHaveClass("text-sm")
30+
expect(link).toHaveClass("min-w-20")
2331
})
24-
})
32+
})

vitest.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { defineConfig } from 'vitest/config'
2-
import react from '@vitejs/plugin-react'
3-
import tsconfigPaths from 'vite-tsconfig-paths'
1+
import { defineConfig } from "vitest/config"
2+
import react from "@vitejs/plugin-react"
3+
import tsconfigPaths from "vite-tsconfig-paths"
44

55
export default defineConfig({
66
plugins: [tsconfigPaths(), react()],
77
test: {
8-
environment: 'jsdom',
9-
setupFiles: './vitest.setup.ts',
8+
environment: "jsdom",
9+
setupFiles: "./vitest.setup.ts",
1010
globals: true,
11-
testMatch: ['**/*.test.{ts,tsx}', '**/*.spec.{ts,tsx}'],
12-
exclude: ['**/node_modules/**', '**/dist/**', '**/e2e/**', '.next/**'],
11+
include: ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
12+
exclude: ["**/node_modules/**", "**/dist/**", "**/e2e/**", ".next/**"],
1313
},
14-
})
14+
})

vitest.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import '@testing-library/jest-dom'
1+
import "@testing-library/jest-dom"

0 commit comments

Comments
 (0)