From 8a6a6712e7554f110b5ef951f270d88fd010e040 Mon Sep 17 00:00:00 2001
From: Bertrand Yuan <noreply@bertyuan.com>
Date: Thu, 26 Mar 2026 00:02:16 +0800
Subject: add more tests

---
 src/components/theme-provider.test.tsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 src/components/theme-provider.test.tsx

(limited to 'src/components/theme-provider.test.tsx')

diff --git a/src/components/theme-provider.test.tsx b/src/components/theme-provider.test.tsx
new file mode 100644
index 0000000..0ac54e1
--- /dev/null
+++ b/src/components/theme-provider.test.tsx
@@ -0,0 +1,23 @@
+import { render, screen } from '@testing-library/react';
+import type { ReactNode } from 'react';
+import { describe, expect, test, vi } from 'vitest';
+import { ThemeProvider } from './theme-provider';
+
+vi.mock('next-themes', () => ({
+  ThemeProvider: ({ children }: { children: ReactNode }) => (
+    <div data-testid='next-themes-provider'>{children}</div>
+  ),
+}));
+
+describe('ThemeProvider', () => {
+  test('renders children through next-themes provider', () => {
+    render(
+      <ThemeProvider attribute='class'>
+        <span>content</span>
+      </ThemeProvider>,
+    );
+
+    expect(screen.getByTestId('next-themes-provider')).toBeInTheDocument();
+    expect(screen.getByText('content')).toBeInTheDocument();
+  });
+});
-- 
cgit v1.2.3

