test: update format tests for segment-based output

Problem: format functions now return `forge.Segment[]` instead of
strings, so all tests calling `:find()` and `:match()` on results
were failing.

Solution: add `flatten()` helper that concatenates segment text, and
wrap all format assertions with it. Also fix stylua formatting in
`sources_spec.lua`.
This commit is contained in:
Barrett Ruth 2026-03-28 17:48:35 -04:00
parent fa7cab89af
commit 830442f856
No known key found for this signature in database
GPG key ID: A6C96C9349D2FC81
2 changed files with 38 additions and 27 deletions

View file

@ -86,7 +86,10 @@ describe('github', function()
end)
it('preserves in_progress status in normalize_run', function()
assert.equals('in_progress', gh:normalize_run({ databaseId = 1, status = 'in_progress' }).status)
assert.equals(
'in_progress',
gh:normalize_run({ databaseId = 1, status = 'in_progress' }).status
)
end)
end)