diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-17 14:32:37 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-17 14:32:37 +0800 |
| commit | 5c0ba37eda80d39e6ceca59bb1d5f4942f858995 (patch) | |
| tree | 948723f9cedf7ccb0707fa6ee516bd30fe20fd10 /frontend/src/lib/layout.test.ts | |
| download | strategy-lab-5c0ba37eda80d39e6ceca59bb1d5f4942f858995.tar.gz | |
chore: establish Strategy Lab source baseline (development, not release)
Diffstat (limited to 'frontend/src/lib/layout.test.ts')
| -rw-r--r-- | frontend/src/lib/layout.test.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/frontend/src/lib/layout.test.ts b/frontend/src/lib/layout.test.ts new file mode 100644 index 0000000..99d3c47 --- /dev/null +++ b/frontend/src/lib/layout.test.ts @@ -0,0 +1,18 @@ +import { describe, expect, it } from 'vitest'; +// `?raw` gives us the exact Svelte source for a real regression check +// (ProjectPage used to wrap a second <Layout>, doubling the sidebar). +// Type support comes from vite/client's `*?raw` module declaration. +import projectPageSource from '../pages/ProjectPage.svelte?raw'; + +describe('single layout shell', () => { + it('ProjectPage does not nest its own Layout', () => { + const src: string = projectPageSource as unknown as string; + expect(src).not.toMatch(/import\s+Layout/); + expect(src).not.toMatch(/<Layout/); + // page props still passed through on each tab + expect(src).toMatch(/ProjectDataTab/); + expect(src).toMatch(/ProjectStrategyTab/); + expect(src).toMatch(/ProjectBacktestTab/); + expect(src).toMatch(/ProjectResultsTab/); + }); +}); |
