chore: clean git cache

This commit is contained in:
GitHub Actions
2026-01-02 01:01:54 +00:00
parent aae55a8ae9
commit 5ea207ab47
290 changed files with 62353 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import { describe, it, expect, vi } from 'vitest'
import { render, waitFor } from '@testing-library/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import SystemStatus from '../SystemStatus'
import * as systemApi from '../../api/system'
// Mock the API module
vi.mock('../../api/system', () => ({
checkUpdates: vi.fn(),
}))
const renderWithClient = (ui: React.ReactElement) => {
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
},
})
return render(
<QueryClientProvider client={queryClient}>
{ui}
</QueryClientProvider>
)
}
describe('SystemStatus', () => {
it('calls checkUpdates on mount', async () => {
vi.mocked(systemApi.checkUpdates).mockResolvedValue({
available: false,
latest_version: '1.0.0',
changelog_url: '',
})
renderWithClient(<SystemStatus />)
await waitFor(() => {
expect(systemApi.checkUpdates).toHaveBeenCalled()
})
})
})