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