blob: 99d3c4745a7831cff2b4fd6c8b9105052d3359b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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/);
});
});
|