| name | djls-testing |
| description | Use when running tests, fixing failing tests, updating snapshots, syncing corpus data, validating before push, or working with Django matrix testing in django-language-server. Handles cargo, just, nox, insta, corpus, clippy, fmt, and lint commands. |
DJLS Testing
Use this when validating changes or fixing test failures.
Common commands
cargo build -q
cargo test -q
cargo test test_name
cargo test -p crate_name
just test
just clippy
just fmt
just lint
just corpus lock
just corpus sync
just corpus sync -U
just corpus clean
just dev profile <bench> [filter]
Never use cargo doc --open.
Rules
- All tests must pass. Fix failures instead of dismissing them as pre-existing or unrelated.
- If corpus tests fail, run
just corpus sync and fix/update snapshots as needed.
- Before pushing, run
just clippy, just fmt, and just lint.
- Python inspector changes must be tested against all supported Django versions; see
DJ_VERSIONS in noxfile.py.
Snapshots
- Use
insta for template parser snapshots.
- Add cases to existing test modules; do not create standalone test files.
- After changing serialized types, run:
cargo insta test --accept --unreferenced delete