import React from 'react';
import { describe, expect, test } from 'bun:test';
import { renderToStaticMarkup } from 'react-dom/server';
import { JsonSummaryView } from './JsonSummaryView';
describe('JsonSummaryView', () => {
test('prioritizes a record identity and makes URLs navigable', () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain('OPE-266 · Refresh git status');
expect(html).toContain('href="https://linear.app/openchamber/issue/OPE-266"');
expect(html).toContain('Relations');
expect(html).not.toContain('surface-elevated');
});
test('summarizes record arrays as expandable sections', () => {
const html = renderToStaticMarkup(
,
);
expect(html).toContain('Issues (1)');
expect(html).toContain('OPE-1 · Example issue');
});
});