同步 b7516

This commit is contained in:
2026-01-23 11:34:20 +08:00
parent d3752412b3
commit b1cf23ae3e
2015 changed files with 935048 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts">
import * as Tooltip from '$lib/components/ui/tooltip';
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
import Page from '../../../src/routes/+page.svelte';
let sidebarOpen = $state(false);
</script>
<!--
Test wrapper that provides necessary context providers for component testing.
This mirrors the providers from +layout.svelte.
-->
<Tooltip.Provider>
<Sidebar.Provider bind:open={sidebarOpen}>
<Page />
</Sidebar.Provider>
</Tooltip.Provider>

View File

@@ -0,0 +1,11 @@
import { describe, it, expect } from 'vitest';
import { render } from 'vitest-browser-svelte';
import TestWrapper from './components/TestWrapper.svelte';
describe('/+page.svelte', () => {
it('should render page without throwing', async () => {
// Basic smoke test - page should render without throwing errors
// API calls will fail in test environment but component should still mount
expect(() => render(TestWrapper)).not.toThrow();
});
});