From 6d208d7d23001cd352ea8a5c3ee34affd8a5efcb Mon Sep 17 00:00:00 2001
From: popsiclelmlm
Date: Wed, 13 May 2026 04:34:21 +0800
Subject: [PATCH 1/2] test: add interface plugin coverage
---
.../components/button/Button.test.tsx | 38 +++++++++++++++++
.../components/select/index.test.tsx | 27 ++++++++++++
plugins/interface/index.test.tsx | 32 ++++++++++++++
plugins/interface/utils/index.test.tsx | 42 +++++++++++++++++++
4 files changed, 139 insertions(+)
create mode 100644 plugins/interface/components/button/Button.test.tsx
create mode 100644 plugins/interface/components/select/index.test.tsx
create mode 100644 plugins/interface/index.test.tsx
create mode 100644 plugins/interface/utils/index.test.tsx
diff --git a/plugins/interface/components/button/Button.test.tsx b/plugins/interface/components/button/Button.test.tsx
new file mode 100644
index 0000000..2ff31c6
--- /dev/null
+++ b/plugins/interface/components/button/Button.test.tsx
@@ -0,0 +1,38 @@
+import { renderToString } from 'hono/jsx/dom/server'
+import { describe, expect, it } from 'vitest'
+import { Button } from './Button'
+
+describe('Button', () => {
+ it('renders a button with variant, size, title, and custom classes', () => {
+ const html = renderToString(
+
+ )
+
+ expect(html).toContain('
')
+ })
+
+ it('renders an anchor avatar with an image when href and image are provided', () => {
+ const html = renderToString(
+
+ )
+
+ expect(html).toContain(' {
+ it('renders a secondary div card by default', () => {
+ const html = renderToString(
+ Card content
+ )
+
+ expect(html).toContain(' {
+ const html = renderToString(
+
+ Tables
+
+ )
+
+ expect(html).toContain('
{
+ it('renders a plain input with sizing, value, and invalid state classes', () => {
+ const html = renderToString(
+
+ )
+
+ expect(html).toContain(' {
+ const html = renderToString(
+
+ )
+
+ expect(html).toContain(' {
+ it('renders title and children', () => {
+ const html = renderToString(
+
+ )
+
+ expect(html).toContain('