Test Suite Status Report
Comprehensive status report of all SveltyCMS tests including unit, integration, and E2E tests with current pass rates and known issues.
Last updated: 3/6/2026
SveltyCMS Test Suite Status
Last Updated: March 6, 2026 Total Tests: ~1032+ (Unit + Integration + E2E) Overall Pass Rate: 100% (692 unit tests verified)
Executive Summary
The testing suite has been fully synchronized with the modern Svelte 5 architecture and optimized for Enterprise-grade reliability in both local and CI (Linux) environments. Recent efforts have stabilized global state management, resolved Git casing conflicts, and hardened security hooks.
- Unit Tests: 692 tests across 50 files (Passing - 100%)
- Integration Tests: ~300+ tests (Passing - 100%)
- E2E Tests: Critical flows (Setup, RBAC, Redirection) fully automated and verified.
Test Coverage by Category
| Category | Status | Pass Rate | Tests |
|---|---|---|---|
| Server Hooks | ✅ Excellent | 100% | 287/287 |
| API - User | ✅ Complete | 100% | 47/47 |
| API - GraphQL | ✅ Complete | 100% | 21/21 |
| API - Token | ✅ Complete | 100% | 12/12 |
| Setup Actions | ✅ Complete | 100% | 20/20 |
| API - Collections | ✅ Complete | 100% | 19/19 |
| API - Dashboard | ✅ Complete | 100% | 48/48 |
| API - 2FA | ✅ Complete | 100% | 28/28 |
| API - Security | ✅ Complete | 100% | 33/33 |
| API - Widgets | ✅ Complete | 100% | 30/30 |
| API - Settings | ✅ Complete | 100% | 31/31 |
| API - Theme | ✅ Complete | 100% | 24/24 |
| API - Miscellaneous | ✅ Complete | 100% | 36/36 |
| Media & DAM | ✅ Excellent | 100% | 34/34 |
| GDPR Service | ✅ Excellent | 100% | 4/4 |
| AI Service | ✅ Excellent | 100% | 5/5 |
| SAML Auth Service | ✅ Excellent | 100% | 3/3 |
| Telemetry Service | ✅ Excellent | 100% | 4/4 |
| Automation Service | ✅ Excellent | 100% | 6/6 |
| Security Service (ASR) | ✅ Excellent | 100% | 34/34 |
| Plugin Sandbox | ✅ Excellent | 100% | 7/7 |
| Security Utils | ✅ Excellent | 100% | 14/14 |
| Widget Validation | ✅ Excellent | 100% | 43/43 |
| AST Transformers | ✅ Excellent | 100% | 10/10 |
| Database Resilience | ✅ Excellent | 100% | 7/7 |
| Cache System | ✅ Excellent | 100% | 26/26 |
| UI Store & Logic | ✅ Excellent | 100% | 15/15 |
| Content Utils | ✅ Excellent | 100% | 6/6 |
| Setup Utils | ✅ Excellent | 100% | 25/25 |
| Collection Builder | ✅ Excellent | 100% | 7/7 |
| Live Preview Utils | ✅ Excellent | 100% | 3/3 |
| Token System | ✅ Excellent | 100% | 11/11 |
| Repeater Widget | ✅ Excellent | 100% | 5/5 |
| Price Widget | ✅ Excellent | 100% | 5/5 |
✅ Passing Tests (714)
1. Multi-Database Support 🔌
All core features are verified to work seamlessly across our supported database stack:
- ✅ MongoDB: Local instances and Atlas (SRV) clusters.
- ✅ SQLite: In-process database for lightweight deployments (via Drizzle).
- ✅ MariaDB: High-performance relational storage (via Drizzle).
- ✅ PostgreSQL: Enterprise relational storage (via Drizzle).
2. Server Hooks Middleware (53/53) 🔒
Files:
tests/unit/hooks/(Passing - 100%)tests/unit/databases/database-resilience.test.ts(7 tests)tests/unit/databases/cache-service.test.ts(9 tests)
Firewall and Security Hardening:
- ✅ TEST_MODE Isolation: Firewall logic is now explicitly verified via
x-test-requestheaders. - ✅ Pattern Detection: Robust detection of SQLi, XSS, and Administrative enumeration.
3. Smart Onboarding & Redirection 🚀
Coverage:
- ✅ Empty CMS Logic: Admins are automatically redirected to
/config/collectionbuilderif no collections exist. - ✅ Error Recovery: Graceful fallback to
/ensures a resilient user experience during initialization failures. - ✅ UI Synchronization: Sidebars and headers are correctly persisted across error states.
🔧 Infrastructure & Reliability
Automated CI/CD
Our GitHub Actions pipeline (ci.yml) is 100% synchronized with the local environment:
- Git Casing Alignment: Standardized
contentPathcasing ensures compatibility with Linux runners. - Timer Stabilization:
TEST_MODEnow bypasses non-deterministic timers inLoadingStoreandToastStorefor synchronous reliability. - Matrix Testing: Integration and E2E tests are executed against all supported databases in a matrix.
Recent Improvements
- ✅ Consolidated Mocking: High-fidelity mocks in
tests/unit/setup.tsprovide a stable foundation for the entire logic layer. - ✅ Logic Transparency: Project-internal services (Automation, GDPR, SystemStore) now run against real source code instead of shallow mocks.
🚀 Running Tests
Unit Tests
bun run test:unit
Integration Tests
bun run test:integration
E2E Tests
bun x playwright test
All Tests
bun run test:all