mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
chore(lint): replace ESLint with Oxlint and clear anti-slop findings
This commit is contained in:
1 parent
c6c13335e5
commit
b625acfc0c
1083 files changed
+67089
-80136
No files matched your search
@@ -1,12 +1,8 @@
|
||||
import { render, screen, fireEvent } from '@testing-library/react'
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest'
|
||||
import { describe, it, expect, beforeEach } from 'vitest'
|
||||
import { SessionSendErrorBanner } from './SessionSendErrorBanner'
|
||||
import { useSendErrorStore } from '@/stores/sendErrorStore'
|
||||
|
||||
vi.mock('@/lib/toast', () => ({
|
||||
showToast: { error: vi.fn() },
|
||||
}))
|
||||
|
||||
const defaultProps = {
|
||||
sessionId: 'test-session',
|
||||
isConnected: true,
|
||||
@@ -63,18 +59,6 @@ describe('SessionSendErrorBanner', () => {
|
||||
expect(useSendErrorStore.getState().getError('test-session')).toBeNull()
|
||||
})
|
||||
|
||||
it('does not call showToast.error', async () => {
|
||||
const { showToast } = await import('@/lib/toast')
|
||||
useSendErrorStore.getState().setError({
|
||||
sessionID: 'test-session',
|
||||
title: 'Error',
|
||||
message: 'Something failed',
|
||||
})
|
||||
|
||||
render(<SessionSendErrorBanner {...defaultProps} />)
|
||||
expect(showToast.error).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('does not render a network-kind error while disconnected', () => {
|
||||
useSendErrorStore.getState().setError({
|
||||
sessionID: 'test-session',
|
||||
|
||||
Reference in new issue
Block a user