mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 11:13:33 +01:00
test: remove redundant tests
Remove integration tests in config_extended_test.go that duplicate unit tests in config_test.go for findLocalCheatpath. Remove redundant fuzz functions (FuzzFindLocalCheatpathNearestWins, FuzzTagsStress), a duplicate parse test (TestParseInvalidYAML), and a permanently-skipped interactive test (TestPromptIntegration). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,22 +27,3 @@ func TestParseWindowsLineEndings(t *testing.T) {
|
||||
t.Errorf("failed to parse syntax: want: %s, got: %s", want, fm.Syntax)
|
||||
}
|
||||
}
|
||||
|
||||
// TestParseInvalidYAML tests parsing with invalid YAML in frontmatter
|
||||
func TestParseInvalidYAML(t *testing.T) {
|
||||
// stub our cheatsheet content with invalid YAML
|
||||
markdown := `---
|
||||
syntax: go
|
||||
tags: [ test
|
||||
unclosed bracket
|
||||
---
|
||||
To foo the bar: baz`
|
||||
|
||||
// parse the frontmatter
|
||||
_, _, err := parse(markdown)
|
||||
|
||||
// assert that an error was returned for invalid YAML
|
||||
if err == nil {
|
||||
t.Error("expected error for invalid YAML, got nil")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user