Integration Tests#
Place integration tests here for testing multiple components, modules, or services working together.
Structure#
integration/
โโโ api/ # API integration tests
โโโ pages/ # Page-level integration tests
โโโ flows/ # User flow integration tests
Example#
import { describe, it, expect } from 'vitest';
import { render } from '@testing-library/svelte';
import HomePage from '$lib/routes/+page.svelte';
describe('Home Page Integration', () => {
it('displays all sections correctly', () => {
const { getByText } = render(HomePage);
expect(getByText('Projects')).toBeTruthy();
expect(getByText('About')).toBeTruthy();
});
});
Running Tests#
pnpm test:integration