{"repo":"spences10/sveltest","free":true,"listed":false,"github":"https://github.com/spences10/sveltest","clone":"git clone https://github.com/spences10/sveltest.git","description":"Comprehensive Svelte 5 testing examples and patterns using Vitest Browser Mode, Playwright, and vitest-browser-svelte","language":"TypeScript","stars":112,"topics":["playwright","svelte","svelte5","sveltekit","testing","typescript","vitest","vitest-browser-svelte"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"Sveltest A comprehensive example project demonstrating vitest-browser-svelte testing patterns for modern Svelte 5 applications. Built over a weekend as a companion piece to my blog post: Migrating from @testing-library/svelte to vitest-browser-svelte. 🎯 What is Sveltest? Sveltest is both a comprehensive reference project and a CLI tool for vitest-browser-svelte - the modern testing solution for Svelte applications. Use it as: - 📚 A reference project showcasing real-world testing patterns - 🤖 A CLI tool for AI assistants to quickly access testing examples - 📖 A learning resource with comprehensive documentation This project demonstrates my opinionated approach to testing with: - Client-side component testing with real browser environments - Server-side testing for SvelteKit API routes and hooks - SSR testing for server-side rendering validation - Full-stack integration patterns for modern web applications 🔄 Client-Server Alignment Strategy The Problem : Server unit tests with heavy mocking can pass while production breaks due to client-server mismatches. Forms send data in one format, servers expect another, and mocked tests miss the disconnect. My Solution : This project demonstrates a multi-layer testing approach with minimal mocking: - Shared validation logic between client and server prevents contract mismatches - Real FormData/Request objects in server tests (only external services like databases are mocked) - TypeScript contracts ensure data structures align between","default_branch":null,"files":null,"tree":[],"storefront":"/r/spences10","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spences10/sveltest/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}