Fix/post list excerpt rendering (#41)

* feat: use excerpts in post lists

* chore: made testing less noisy

---------

Co-authored-by: hugo <hugoms@me.com>
This commit is contained in:
Georg Bauer
2026-03-07 10:15:57 +01:00
committed by GitHub
parent 9871cb827f
commit f1c9038803
8 changed files with 349 additions and 124 deletions

View File

@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest';
import { withCapturedConsole } from './consoleCapture';
describe('withCapturedConsole', () => {
it('captures expected console output without leaking it to the test run', async () => {
await withCapturedConsole('error', async (captured) => {
const error = new Error('expected failure');
console.error('[Test]', error);
expect(captured.spy).toHaveBeenCalledWith('[Test]', error);
expect(captured.text()).toContain('[Test]');
expect(captured.text()).toContain('expected failure');
});
});
});