This repository is a VS Code extension that provides one-click test running and debugging for multiple JavaScript/TypeScript test frameworks: Jest, Vitest, Playwright, Rstest, Bun, Deno, and the Node.js native test runner. It offers three execution modes: CodeLens actions on test blocks, a terminal-based runner via context menus and commands, and a full Test Explorer with Run, Debug, Coverage, and Update Snapshots profiles. The extension performs static analysis of test files using Babel AST parsing to extract test structure (describe/it blocks, parameterized tests) and builds per-framework CLI commands without executing config files. It uses injected reporter templates that output framed JSON messages to stdout for robust result extraction. The codebase demonstrates strong software engineering practices: a layered architecture with separation of concerns (detection, execution, parsing, reporting), extensive caching to avoid redundant work, cross-platform shell handling for Windows/POSIX, and a large test suite with both mocked and real e2e tests. While primarily an application (VS Code extension), many internal modules are designed as reusable utilities—shell quoting, path normalization, generic caching, static config evaluation, and result matching—that could be extracted for use in other CLI tools or editors.
This VS Code extension provides comprehensive language support for the Crystal programming language. It includes syntax highlighting for Crystal, ECR (Embedded Crystal), and Slang templates, along with auto-indentation, snippets, and code formatting via the Crystal compiler's `tool format`. It integrates deeply with the Crystal toolchain to offer problems detection (compiler errors displayed inline), hover type information, go-to-definition, document symbols, and a macro expansion viewer. A task provider enables running common `crystal` and `shards` commands directly from the editor. A spec test explorer allows running and viewing Crystal spec results using the native VS Code testing UI, parsing JUnit XML output. The extension can optionally delegate to an external LSP server (e.g., Crystalline) for more advanced language intelligence. All language-aware features are implemented by spawning the Crystal compiler tool with appropriate flags and parsing its JSON/flat output, with careful management of compiler processes via mutexes and per-project cache directories. The source code is written in TypeScript and divided into modular providers (completion, definitions, hover, format, problems, symbols, tasks, spec).