mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
* 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.
31 lines
831 B
TypeScript
31 lines
831 B
TypeScript
import { screen } from '@testing-library/react'
|
|
import { expect, test, vi } from 'vitest'
|
|
|
|
import LogsQueryPanel from 'components/interfaces/Settings/Logs/LogsQueryPanel'
|
|
import { render } from 'tests/helpers'
|
|
|
|
test('run and clear', async () => {
|
|
const mockRun = vi.fn()
|
|
const mockClear = vi.fn()
|
|
render(
|
|
<LogsQueryPanel
|
|
defaultFrom=""
|
|
defaultTo=""
|
|
isLoading={false}
|
|
onDateChange={() => {}}
|
|
onSelectSource={() => {}}
|
|
onSelectTemplate={() => {}}
|
|
warnings={[]}
|
|
onClear={mockClear}
|
|
hasEditorValue
|
|
warehouseCollections={[]}
|
|
dataSource="logs"
|
|
onDataSourceChange={() => {}}
|
|
templates={[]}
|
|
warehouseTemplates={[]}
|
|
onSelectWarehouseTemplate={() => {}}
|
|
/>
|
|
)
|
|
await expect(screen.findByPlaceholderText(/Search/)).rejects.toThrow()
|
|
})
|