···11# Default profile — used by `just test` and ad-hoc `cargo nextest run`.
22+# `just test` applies `-E 'not binary(real_world_roundtrip)'` to filter
33+# out network-dependent tests. Run them explicitly via
44+# `just test-real-world` / `just test-all`.
25[profile.default]
36# Surface failing test output inline as it happens, then repeat the
47# summary at the end. On success, stay quiet — use `just test-verbose`
···1114fail-fast = false
12151316# Network-gated real-world roundtrip overrides. Absorb flaky DNS/HTTP
1414-# with a couple of retries, warn when a single attempt takes more than
1515-# 30s (a dead resolver, usually), and hard-kill after 3 minutes to
1616-# prevent wedged CI. The binary filter covers every `roundtrip_*` test
1717-# added via the `roundtrip_test!` macro.
1717+# with retries, warn on slow single attempts, hard-kill wedged runs.
1818+# Applies whenever the roundtrip binary runs, under any profile.
1819#
1920# No test-group here: nextest runs each test in its own OS process, so
2021# `std::env::set_current_dir` calls are isolated per test. Each of the
···66# Default: run all tests
77default: test
8899-# Install developer tools (test runner, etc.)
99+# Install developer tools (test runner, snapshot reviewer)
1010install-tools:
1111 cargo install cargo-nextest --locked
1212+ cargo install cargo-insta --locked
12131314# Run every test across the workspace (excluding packages we can't build
1414-# locally). Nextest already parallelises across binaries, so a single
1515-# invocation is both faster and more comprehensive than chaining the
1616-# per-suite recipes below — those remain useful for targeted runs.
1515+# locally). Nextest parallelises across binaries, so a single invocation
1616+# is both faster and more comprehensive than chaining the per-suite
1717+# recipes below — those remain useful for targeted runs. Use
1818+# `just test-fast` to skip network-dependent real-world tests.
1719test:
1820 @echo "Running all workspace tests..."
1921 cargo nextest run --workspace --exclude tree-sitter-mlf --exclude mlf-wasm
2222+2323+# Run everything except network-dependent real-world roundtrip tests
2424+test-fast:
2525+ @echo "Running workspace tests (excluding real-world)..."
2626+ cargo nextest run --workspace --exclude tree-sitter-mlf --exclude mlf-wasm -E 'not binary(real_world_roundtrip)'
20272128# Run only language tests (mlf-lang crate)
2229test-lang:
···5461 cargo nextest run -p mlf-integration-tests --test workspace_integration
55625663# Run only the network-dependent real-world round-trip tests
5757-test-real-world:
6464+test-real:
5865 @echo "\n🌐 Running real-world round-trip tests (fetches from network)..."
5966 cargo nextest run -p mlf-integration-tests --test real_world_roundtrip
6767+6868+# Review pending insta snapshot changes (accepts / rejects `.snap.new` files)
6969+review:
7070+ cargo insta review
60716172# Run tests with verbose output (stdout streamed live, tests run serially)
6273test-verbose:
+1
tests/Cargo.toml
···2020tokio = { version = "1", features = ["full"] }
2121tempfile = "3.8"
2222datatest-stable = "0.3"
2323+insta = { version = "1.43", features = ["json"] }
23242425[dev-dependencies]
2526# Any additional test dependencies
···11-com.example.const_float_stringifies: @const("x-threshold", 3.14): ATProto's data model has no floats; emitting as string "3.14" to stay spec-compliant
···11-[test]
22-name = "const_float_stringifies"
33-description = "@const with a fractional numeric value stringifies to stay spec-compliant and emits a warning"
44-namespace = "com.example.const_float_stringifies"
···11+---
22+source: tests/codegen_integration.rs
33+expression: formatted_warnings
44+---
55+[
66+ "com.example.const_float_stringifies: @const(\"x-threshold\", 3.14): ATProto's data model has no floats; emitting as string \"3.14\" to stay spec-compliant",
77+]
···11-[test]
22-name = "item_extensions_codegen"
33-description = "@const annotations on a record emit as extra JSON fields on the record def"
44-namespace = "com.example.item_extensions_codegen"
···11+---
22+source: tests/lexicon_to_mlf_integration.rs
33+expression: formatted_warnings
44+---
55+[
66+ "com.example.emptyunion: open union has no `refs`; emitting `unknown` as a placeholder (ATProto spec lists `refs` as required on union types)",
77+]
···11-com.example.refhint: extension field "xFallback" has value "com.example.other#someType" which looks NSID-shaped; emitted as `@const` — consider `@reference` if you intend workspace name resolution when hand-editing the MLF
···11+---
22+source: tests/lexicon_to_mlf_integration.rs
33+expression: formatted_warnings
44+---
55+[
66+ "com.example.refhint: extension field \"xFallback\" has value \"com.example.other#someType\" which looks NSID-shaped; emitted as `@const` — consider `@reference` if you intend workspace name resolution when hand-editing the MLF",
77+]
···11+---
22+source: tests/lexicon_to_mlf_integration.rs
33+expression: output.mlf
44+---
55+/// A short description of the whole lexicon.
66+self {}
77+88+@main
99+def type described = {
1010+ name!: string,
1111+};