From 05b1c8101fdb253b4e58ee7cff218dd3713a63a4 Mon Sep 17 00:00:00 2001 From: Jacob Richman Date: Fri, 20 Jun 2025 05:27:03 +0000 Subject: Turn off debug logging of MaxSizedBox errors by default. (#1228) --- packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx') diff --git a/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx b/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx index 23ef98cd..7abd19a2 100644 --- a/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx +++ b/packages/cli/src/ui/components/shared/MaxSizedBox.test.tsx @@ -5,11 +5,17 @@ */ import { render } from 'ink-testing-library'; -import { MaxSizedBox } from './MaxSizedBox.js'; +import { MaxSizedBox, setMaxSizedBoxDebugging } from './MaxSizedBox.js'; import { Box, Text } from 'ink'; import { describe, it, expect } from 'vitest'; describe('', () => { + // Make sure MaxSizedBox logs errors on invalid configurations. + // This is useful for debugging issues with the component. + // It should be set to false in production for perfornance and to avoid + // cluttering the console if there are ignoreable issues. + setMaxSizedBoxDebugging(true); + it('renders children without truncation when they fit', () => { const { lastFrame } = render( -- cgit v1.2.3