Files
supabase/packages/ui/src/components/Checkbox/Checkbox.test.jsx
T
Ivan Vasilov cb1e3a8170 chore: Prep work for pnpm (#29610)
* Add all missing libraries in the packages/apps.

* Add all missing Vitest imports to the tests.

* Add some missing exports to ui.

* Fix the admonition export.

* Fix various minor bugs.

* Migrate the ui package to use vitest.
2024-10-01 11:29:37 +02:00

18 lines
575 B
React

import { render, screen } from '@testing-library/react'
import React from 'react'
import { describe, expect, it } from 'vitest'
import Checkbox from './Checkbox'
describe('#Checkbox', () => {
it('should render checkbox correctly', () => {
render(<Checkbox data-testid="form-checkbox" label="labelIsRequired" />)
expect(screen.queryByTestId('form-checkbox')).toBeInTheDocument()
})
it('should show label', () => {
render(<Checkbox data-testid="form-checkbox" label="JavaScript" />)
expect(screen.queryByText('JavaScript')).toBeInTheDocument()
})
})