import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'

import Tag, { type TagColorList } from './Tag'

describe('Tag', () => {
  const colors: TagColorList[] = [
    'blue',
    'red',
    'green',
    'yellow',
    'purple',
    'royal-blue',
    'teal',
    'pink',
    'orange',
    'gray',
    'light-gray',
    'dark-gray',
  ]

  colors.forEach((color) => {
    it(`should render ${color} tag`, () => {
      render(<Tag color={color}>Tag</Tag>)
      expect(screen.getByTestId(`tag-${color}`)).toBeInTheDocument()
    })
  })
})
