test: correct mislabelled vacuous test in src/compile/types.rs#1518
Merged
Conversation
Rename test_front_matter_safe_outputs_triggers_conclusion_job →
test_front_matter_safe_outputs_noop_object_form and replace the
near-vacuous assert!(!fm.safe_outputs.is_empty()) assertion with a
meaningful check that noop: {} parses as a JSON object (not a bool
or null). The old assertion trivialy passed for any non-empty
safe-outputs block and said nothing about conclusion-job triggering,
which happens in the compiler, not the front-matter parser.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Suite Reduction: src/compile/types.rs
What was wrong
test_front_matter_safe_outputs_triggers_conclusion_job: the test name claimed to verify that a non-emptysafe-outputsblock triggers the conclusion job, but the body only parsed front matter and asserted!fm.safe_outputs.is_empty(). Two problems:!fm.safe_outputs.is_empty()trivially passes for any non-emptysafe-outputs:block, regardless of correctness.Changes
test_front_matter_safe_outputs_triggers_conclusion_jobNew test:
test_front_matter_safe_outputs_noop_object_form— verifies thatnoop: {}parses as a JSON object value (is_object()== true), distinguishing it fromnoop: false(boolean disable, tested intest_front_matter_safe_outputs_noop_disabled) and barenoop:(null/default). This is the actual observable contract of the front-matter parser for the object-form noop idiom.Verification
cargo test: all 2570 tests pass ✅cargo clippy --all-targets --all-features: no errors or unused-import warnings ✅Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comSee Network Configuration for more information.