Skip to main content
    Back to Courses
    Intermediate

    Testing with Vitest

    This focused one-day course teaches you everything about testing JavaScript and TypeScript applications with Vitest. You'll learn test-driven development workflows, writing effective unit and integration tests, mocking strategies, snapshot testing, code coverage analysis, and CI/CD pipeline integration. Practical examples from real projects included.

    4 Modules
    16 Lessons
    1 Tag
    Testing with Vitest – 1 Tag Web course at apigenio

    Skills You'll Learn

    Vitest configuration & workspace
    Unit & integration testing
    Mocking & stubbing strategies
    Snapshot testing
    Code coverage & reporting
    CI/CD pipeline integration

    Course Modules & Lessons

    1

    Vitest Fundamentals

    Setup, configuration, writing your first tests, and test runner features

    2h
    Vitest installieren & konfigurieren

    Setup, vitest.config.ts und Integration in bestehende Projekte

    25min
    Ersten Test schreiben

    describe, it, expect und die wichtigsten Matcher

    25min
    Test Runner Features

    Watch Mode, Filtering, nur fehlgeschlagene Tests und Reporter

    20min
    Teststruktur & Organisation

    Dateibenennung, Ordnerstruktur und Setup/Teardown

    20min
    2

    Advanced Testing

    Mocking, spying, stubbing, async testing, and snapshot tests

    2h
    Mocking & Spying

    vi.fn(), vi.mock() und vi.spyOn() effektiv einsetzen

    25min
    Module Mocking

    Ganze Module und Abhängigkeiten mocken

    20min
    Async Testing

    Promises, Timer und asynchrone Funktionen testen

    25min
    Snapshot Tests

    Snapshots erstellen, aktualisieren und sinnvoll einsetzen

    20min
    3

    Real-World Patterns

    Testing Vue/React components, API mocking, and coverage strategies

    2h
    Vue-Komponenten testen

    mount, shallowMount und Interaktionen mit Vue Test Utils

    30min
    React-Komponenten testen

    render, screen und userEvent mit Testing Library

    30min
    API-Mocking mit MSW

    Mock Service Worker für realistische API-Tests

    25min
    Code Coverage analysieren

    Coverage-Berichte lesen und Schwachstellen finden

    20min
    4

    CI & Automation

    GitHub Actions integration, coverage thresholds, and test reporting

    2h
    GitHub Actions für Tests

    Workflow-Datei erstellen und Tests automatisch ausführen

    25min
    Coverage Thresholds

    Mindest-Coverage definieren und im CI erzwingen

    20min
    Test-Reporting & Badges

    JUnit-Reports, Coverage-Badges und PR-Kommentare

    20min
    Best Practices & Wartung

    Flaky Tests vermeiden, Testpyramide und Refactoring-Strategien

    20min

    Prerequisites

    • JavaScript/TypeScript proficiency
    • Basic understanding of testing concepts

    Ready to start?

    Join thousands of students already learning.

    Your Trainer

    David Pinezich

    David Pinezich

    Experienced IT architect and trainer specializing in Python, Cloud Architecture, and Enterprise Solutions. Certified TOGAF, CISSP, and AWS professional with years of hands-on training experience.

    We use analytics cookies to improve our website. Learn more