insta-snapshots
Installation
SKILL.md
This skill guides you through working with insta snapshot tests in the Oxc codebase without requiring terminal interaction.
What are Insta Snapshots?
Insta is a snapshot testing library for Rust. Oxc uses it extensively for:
- Linter rule tests (
crates/oxc_linter/src/snapshots/) - Semantic analysis tests (
crates/oxc_semantic/tests/integration/snapshots/) - Other crate-specific snapshot tests
Snapshots track expected test outputs (often failures or errors). When code changes, new snapshots are generated as .snap.new files for review.
Running Tests and Generating Snapshots
Run tests for a specific crate:
cargo test -p <crate_name>