UNPKG

@nanocollective/nanocoder

Version:

A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter

45 lines 1.51 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { render } from 'ink-testing-library'; import { ThemeContext } from '../hooks/useTheme.js'; import { TitleShapeContext } from '../hooks/useTitleShape.js'; import { UIStateProvider } from '../hooks/useUIState.js'; // Default test colors that match the structure used in the app const testColors = { primary: 'blue', secondary: 'gray', text: 'white', base: 'black', info: 'cyan', warning: 'yellow', error: 'red', success: 'green', tool: 'magenta', diffAdded: 'green', diffRemoved: 'red', diffAddedText: 'text', diffRemovedText: 'text', }; // Test theme context value const testThemeContext = { currentTheme: 'tokyo-night', colors: testColors, setCurrentTheme: () => { }, }; // Test title shape context value const testTitleShapeContext = { currentTitleShape: 'pill', setCurrentTitleShape: () => { }, }; /** * Wrapper component that provides ThemeContext and TitleShapeContext for tests */ function TestThemeProvider({ children }) { return (_jsx(TitleShapeContext.Provider, { value: testTitleShapeContext, children: _jsx(ThemeContext.Provider, { value: testThemeContext, children: _jsx(UIStateProvider, { children: children }) }) })); } /** * Render a component wrapped with ThemeContext and TitleShapeContext for testing */ export function renderWithTheme(element) { return render(_jsx(TestThemeProvider, { children: element })); } //# sourceMappingURL=render-with-theme.js.map