:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { notebookResultPreview } from './notebookResultPreview'
describe('notebookResultPreview', () => {
it.each([
['keeps a short value', '3', '3'],
['clips a long value', 'x'.repeat(5000), 'x'.repeat(2048)],
['omits an empty value', '', undefined],
])('%s', (_, resultText, expected) => {
expect(notebookResultPreview({ result_text: resultText }).result_text).toEqual(expected)
})
})