mirror of https://github.com/kern/filepizza
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
542 B
TypeScript
17 lines
542 B
TypeScript
/// <reference types="@testing-library/jest-dom" />
|
|
import React from 'react'
|
|
import { render, fireEvent } from '@testing-library/react'
|
|
import { describe, it, expect } from 'vitest'
|
|
import InputLabel from '../../src/components/InputLabel'
|
|
|
|
describe('InputLabel', () => {
|
|
it('shows tooltip on hover', () => {
|
|
const { getByRole, getByText } = render(
|
|
<InputLabel tooltip="tip">Label</InputLabel>,
|
|
)
|
|
const button = getByRole('button')
|
|
fireEvent.mouseOver(button)
|
|
expect(getByText('tip')).toBeInTheDocument()
|
|
})
|
|
})
|