fix: solve linting, formatting and ci/cd errors
This commit is contained in:
parent
22e3c1dc11
commit
e4b8712d01
5 changed files with 36 additions and 28 deletions
|
|
@ -1,24 +1,32 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import { Button } from './Button'
|
||||
import { render, screen } from "@testing-library/react"
|
||||
import { describe, expect, it } from "vitest"
|
||||
import { Button } from "./Button"
|
||||
|
||||
describe('Button', () => {
|
||||
it('renders with children', () => {
|
||||
describe("Button", () => {
|
||||
it("renders with children", () => {
|
||||
render(<Button href="/test">Click me</Button>)
|
||||
expect(screen.getByText('Click me')).toBeInTheDocument()
|
||||
expect(screen.getByText("Click me")).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('applies correct intent classes', () => {
|
||||
const { container } = render(<Button href="/test" intent="secondary">Secondary</Button>)
|
||||
const link = container.querySelector('a')
|
||||
expect(link).toHaveClass('bg-transparent')
|
||||
expect(link).toHaveClass('text-blue-400')
|
||||
it("applies correct intent classes", () => {
|
||||
const { container } = render(
|
||||
<Button href="/test" intent="secondary">
|
||||
Secondary
|
||||
</Button>
|
||||
)
|
||||
const link = container.querySelector("a")
|
||||
expect(link).toHaveClass("bg-transparent")
|
||||
expect(link).toHaveClass("text-blue-400")
|
||||
})
|
||||
|
||||
it('applies correct size classes', () => {
|
||||
const { container } = render(<Button href="/test" size="sm">Small</Button>)
|
||||
const link = container.querySelector('a')
|
||||
expect(link).toHaveClass('text-sm')
|
||||
expect(link).toHaveClass('min-w-20')
|
||||
it("applies correct size classes", () => {
|
||||
const { container } = render(
|
||||
<Button href="/test" size="sm">
|
||||
Small
|
||||
</Button>
|
||||
)
|
||||
const link = container.querySelector("a")
|
||||
expect(link).toHaveClass("text-sm")
|
||||
expect(link).toHaveClass("min-w-20")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue