Skip to content

Implement comprehensive test suite with matrix-driven configuration validation#4

Open
eugenegraves wants to merge 34 commits intomainfrom
test-suite
Open

Implement comprehensive test suite with matrix-driven configuration validation#4
eugenegraves wants to merge 34 commits intomainfrom
test-suite

Conversation

@eugenegraves
Copy link
Copy Markdown
Collaborator

@eugenegraves eugenegraves commented Nov 8, 2025

Summary

  • Stabilized CLI scaffolds uncovered by the expanded test harness: added missing configuration templates, guarded generator logic, and enforced clean pre-run states so every supported combo boots without manual cleanup.
  • Elevated the functional testing stack: each framework, database, auth, and cloud runner now performs pre-run teardown, leverages dependency caching, and filters the matrix to only implemented options—eliminating false negatives from unsupported stacks (e.g., PlanetScale/MySQL).
  • Introduced auth validation atop the functional suite and documented the full battery of scripts in package.json, giving contributors a repeatable path to verify scaffolds end-to-end.
  • Hardened configuration generation in response to the latest issues: tsconfig scaffolding now guards reads/writes with clear error messaging, custom directory prompts fire interactively instead of silently defaulting, and Vue shims ensure their src/types directory exists before writing.

CLI Fixes Driven by Testing

  • Created src/templates/configurations/tsconfig.example.json, src/templates/configurations/eslint.config.mjs, and src/templates/configurations/.prettierignore to resolve TypeScript compile errors and lint failures during scaffolded project validation.
  • Added cleanupProjectDirectory and wired it into every runner to remove stale scaffold directories before each test, preventing “directory already exists” aborts.
  • Updated matrix filters across framework/database/cloud runners to exclude unimplemented engines/ORMs/providers (PlanetScale/MySQL, Prisma combos, etc.), preserving focus on supported permutations.
  • Extended dependency caching support so repeated installs across the 1k+ test cases reuse node_modules snapshots, stabilizing install steps and cutting runtime.
  • Wrapped tsconfig template processing in a try/catch, creating the project directory on demand and logging contextual errors when reads, parses, or writes fail.
  • Ensured getFrontendDirectoryConfigurations prompts for custom layouts instead of silently applying defaults, while non-custom flows retain automatic values for CI/--skip.
  • Created src/types/ automatically for Vue projects before emitting vue-shim.d.ts, eliminating intermittent ENOENT failures in validators.

Test Coverage & Results (Most Recent Full Runs)

Suite Scope Pass Count Total Success Rate Notes
Functional core Structure, build, dependency, server validators (test:functional, test:server, test:build, test:deps) 4 4 100% Baseline scaffold sanity.
React Validator + full matrix runner 96 96 100% All supported DB/ORM/auth combos; custom directory prompts verified.
Vue Validator + full matrix runner 88 96 91.7% Eight “none + none” permutations still fail during dependency install (expected).
Svelte Validator + full matrix runner 88 96 91.7% Same “none + none” dependency issue.
HTML Validator + full matrix runner 88 96 91.7% Minimal stacks without DB continue to fail install; no regressions.
HTMX Validator + full matrix runner 88 96 91.7% Follows the HTML pattern; known install gaps remain.
SQLite Validator + full matrix runner 320 320 100% Covers local + Turso scenarios across frameworks/ORMs/auth.
PostgreSQL Validator + full matrix runner 160 320 50.0% Neon (remote) passes; local Docker combos fail due to sandbox/docker credential limits.
MySQL Validator + full matrix runner 0 320 0% PlanetScale filtered out; remaining local Docker combos fail and local runs expose schema mismatch (uid) still pending fix.
MongoDB Validator + full matrix runner 0 80 0% Handlers fail on missing users/count_history collections; captured for follow-up.
Cloud providers Neon/PostgreSQL, Turso/SQLite combinations 320 320 100% PlanetScale/MySQL excluded until implementation lands.
Auth Validator + full matrix runner (absoluteAuth across frameworks/DBs) 200 200 100% Confirms handler/schema/env/server integration plus functional pass-through.

Totals reflect supported combinations after matrix filtering; Docker-dependent failures and template gaps remain documented but no longer bring down the suite.

Testing Commands

  • bun run test:functional
  • bun run test:server
  • bun run test:build
  • bun run test:deps
  • bun run test:react
  • bun run test:react:all
  • bun run test:vue
  • bun run test:vue:all
  • bun run test:svelte
  • bun run test:svelte:all
  • bun run test:html
  • bun run test:html:all
  • bun run test:htmx
  • bun run test:htmx:all
  • bun run test:sqlite
  • bun run test:sqlite:all
  • bun run test:postgresql
  • bun run test:postgresql:all
  • bun run test:mysql
  • bun run test:mysql:all
  • bun run test:mongodb
  • bun run test:mongodb:all
  • bun run test:cloud
  • bun run test:cloud:all
  • bun run test:auth
  • bun run test:auth:all

Summary by CodeRabbit

Release Notes

New Features

  • Comprehensive Test Infrastructure – Added functional and behavioral test suites for validating framework integrations, database configurations, and authentication setups across multiple combinations.
  • Prisma ORM Support – Added dependencies and configuration for Prisma, including cloud provider support (Neon, PlanetScale).
  • Database Validators – Introduced validators for PostgreSQL (local and remote), MySQL, MongoDB, and SQLite configurations.
  • Git Installation Detection – Added cross-platform Git availability checking with automated installation prompts.
  • Dependency Caching – Implemented caching system for faster test execution.

Bug Fixes

  • Improved error handling in project formatting.
  • Enhanced non-interactive mode defaults.

Chores

  • Updated ESLint and TypeScript configuration.
  • Removed deprecated Prettier configuration template.
  • Added test documentation and migration guides.

✏️ Tip: You can customize this high-level summary in your review settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants