refactor(tests): remove unnecessary comments and improve test clarity across various plugin test files

This commit is contained in:
CodingOnStar
2026-02-11 01:09:56 +08:00
parent b0b4cac03f
commit c36de51771
52 changed files with 2040 additions and 5891 deletions

View File

@ -3,13 +3,11 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import PluginAuth from './plugin-auth'
import { AuthCategory } from './types'
// Mock usePluginAuth hook
const mockUsePluginAuth = vi.fn()
vi.mock('./hooks/use-plugin-auth', () => ({
usePluginAuth: (...args: unknown[]) => mockUsePluginAuth(...args),
}))
// Mock Authorize and Authorized components
vi.mock('./authorize', () => ({
default: ({ pluginPayload }: { pluginPayload: { provider: string } }) => (
<div data-testid="authorize">