CodeVetter · Repo Unpack · Testing signals
swc-project/swc
Tests and CI were inspected, not executed; no passing result or coverage percentage is asserted. The inspected suites combine Rstest API assertions, Rust tests and fixture macros, external execution comparisons, and Node test-runner release contracts. Coverage includes source-context behavior, compiler ordering, source maps, native cache repair, and parser conformance. Feature gates, exclusions, optional suites, and selective CI matrices limit what test existence establishes.
- This investigation inspected test definitions and CI commands without executing them; Rstest configuration and cargo-test workflow declarations provide intended coverage, not evidence that this pinned commit passes.
- Core Rstest has unit and plugin E2E projects with native-test-setup; DISABLE_PLUGIN_E2E_TESTS removes the E2E project, and setup explicitly throws when binding.js cannot initialize.
- Node parse tests cover async/sync AST creation, parse-to-print round-trips, buffer inputs, and missing-file rejection; transform tests cover AST input, legacy plugins, disabled source maps, and React Compiler options.
- Rust source-context unit tests assert span rebasing, dropping out-of-range spans, and preserving reserved positions; a Rust API test verifies custom transforms run after TypeScript stripping.
- Compiler execution fixtures discover exec.js/exec.mjs/exec.ts, build an option matrix, compile each input, execute generated code, and compare stdout; source-map tests write generated artifacts and launch Node validation.
- Parser test262 tests compare normalized pass and pass-explicit ASTs and JSON round-trips; the harness uses unstable libtest and explicitly ignores cases for stack size, Annex B, strict-mode, and Unicode differences.
- Native cache tests cover mode parsing, verified cache hits, corruption recovery, pruning, and custom-root fallback; node:test release contracts assert the 48-artifact inventory and reject missing, duplicate, stale, or substituted reports.
- CI selects affected crates and special feature combinations, runs core binding tests on Windows/macOS with Linux commented out in that matrix, and provides separate CodSpeed benchmarks and actionlint/pinact/zizmor checks; these definitions do not establish exhaustive host coverage.