Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
import { renderToString } from 'react-dom/server';
import { beforeEach, describe, expect, test } from 'vitest';
import { getCollector } from './collector';
import { ProfilerBoundary } from './profiler-boundary';
describe('<ProfilerBoundary>', () => {
beforeEach(() => {
getCollector()?.reset();
});
test('renders children', () => {
const html = renderToString(
<ProfilerBoundary name="test-renders">
<span data-testid="child">hello</span>
</ProfilerBoundary>,
);
expect(html).toContain('hello');
});
test('children prop is required in the TypeScript surface', () => {
const node = (
<ProfilerBoundary name="type-probe">
<div />
</ProfilerBoundary>
);
expect(node).toBeDefined();
});
});