test(many): fix whitespace in tests expectations

Due to https://github.com/charmbracelet/glamour/pull/334, the margin
used for markdown rendering has changed by a couple spaces. This
corrects the relevant tests to accomodate that change.
This commit is contained in:
Kynan Ware 2025-03-27 14:21:13 -06:00
parent 49588555c3
commit c1fbc2f05b
5 changed files with 24 additions and 25 deletions

View file

@ -234,7 +234,7 @@ func Test_viewRun(t *testing.T) {
},
},
},
wantOut: "cicada.txt\n\nbwhiizzzbwhuiiizzzz\n\nfoo.md\n\n\n # foo \n\n",
wantOut: "cicada.txt\n\nbwhiizzzbwhuiiizzzz\n\nfoo.md\n\n\n # foo \n\n",
},
{
name: "multiple files, trailing newlines",
@ -277,7 +277,7 @@ func Test_viewRun(t *testing.T) {
},
},
},
wantOut: "some files\n\ncicada.txt\n\nbwhiizzzbwhuiiizzzz\n\nfoo.md\n\n\n \n • foo \n\n",
wantOut: "some files\n\ncicada.txt\n\nbwhiizzzbwhuiiizzzz\n\nfoo.md\n\n\n \n • foo \n\n",
},
{
name: "multiple files, raw",

View file

@ -496,7 +496,7 @@ func Test_createRun(t *testing.T) {
`MaintainerCanModify: false`,
`Body:`,
``,
` my body `,
` my body `,
``,
``,
},
@ -568,7 +568,7 @@ func Test_createRun(t *testing.T) {
`MaintainerCanModify: false`,
`Body:`,
``,
` BODY `,
` BODY `,
``,
``,
},

View file

@ -283,7 +283,7 @@ func TestPRReview_interactive(t *testing.T) {
assert.Equal(t, heredoc.Doc(`
Got:
cool story
cool story
`), output.String())
assert.Equal(t, "✓ Approved pull request OWNER/REPO#123\n", output.Stderr())

View file

@ -141,19 +141,18 @@ func Test_viewRun(t *testing.T) {
opts: ViewOptions{
TagName: "v1.2.3",
},
wantStdout: heredoc.Doc(`
v1.2.3
MonaLisa released this about 1 day ago
Fixed bugs
Assets
windows.zip 12 B
linux.tgz 34 B
View on GitHub: https://github.com/OWNER/REPO/releases/tags/v1.2.3
wantStdout: heredoc.Doc(`v1.2.3
MonaLisa released this about 1 day ago
Fixed bugs
Assets
windows.zip 12 B
linux.tgz 34 B
View on GitHub: https://github.com/OWNER/REPO/releases/tags/v1.2.3
`),
wantStderr: ``,
},
@ -169,8 +168,8 @@ func Test_viewRun(t *testing.T) {
v1.2.3
MonaLisa released this about 1 day ago
Fixed bugs
Fixed bugs
Assets

View file

@ -260,7 +260,7 @@ func Test_ViewRun(t *testing.T) {
social distancing
# truly cool readme check it out
# truly cool readme check it out
@ -279,7 +279,7 @@ func Test_ViewRun(t *testing.T) {
social distancing
# truly cool readme check it out
# truly cool readme check it out
@ -297,7 +297,7 @@ func Test_ViewRun(t *testing.T) {
social distancing
# truly cool readme check it out
# truly cool readme check it out
@ -312,7 +312,7 @@ func Test_ViewRun(t *testing.T) {
social distancing
# truly cool readme check it out
# truly cool readme check it out
@ -650,7 +650,7 @@ func Test_ViewRun_HandlesSpecialCharacters(t *testing.T) {
Some basic special characters " & / < > '
# < is always > than & ' and "
# < is always > than & ' and "