test(parser): migrate frontmatter_extraction_test.go to testify + add missing coverage#36149
Draft
Copilot wants to merge 2 commits into
Draft
test(parser): migrate frontmatter_extraction_test.go to testify + add missing coverage#36149Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
9 tasks
…dd missing tests - Replace all t.Errorf/t.Fatalf with assert.*/require.* assertions - Replace manual map iteration with assert.Equal in TestExtractFrontmatterFromContent - Replace reflect.DeepEqual with assert.Equal (remove reflect import) - Add TestExtractWorkflowNameFromMarkdownBody with 6 test cases - Add TestExtractWorkflowNameFromContent with 6 test cases - Add descriptive messages to all assertions Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve test quality in frontmatter extraction test
test(parser): migrate frontmatter_extraction_test.go to testify + add missing coverage
May 31, 2026
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.
pkg/parser/frontmatter_extraction_test.goused rawt.Errorf/t.Fatalfthroughout and leftExtractWorkflowNameFromContentandExtractWorkflowNameFromMarkdownBodyentirely untested.Testify migration
t.Errorf/t.Fatalfwithrequire.NoError/require.Error/assert.EqualTestExtractFrontmatterFromContent— replaced with a singleassert.Equalon the whole mapreflect.DeepEqual+reflectimport in favour ofassert.EqualNew test coverage
TestExtractWorkflowNameFromMarkdownBody— 6 cases: H1 found, trimmed whitespace, no H1 (filename fallback), empty body, H1 after prose, full-path fallbackTestExtractWorkflowNameFromContent— 6 cases: H1 with frontmatter, H1 without frontmatter, no H1 fallback, empty content, unclosed frontmatter error, full-path fallback