mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 16:23:44 +00:00
test: mock ClickHouse UI components in setupTests.js for improved testing
This commit is contained in:
parent
972357614e
commit
a6fb4df673
1 changed files with 9 additions and 0 deletions
|
|
@ -54,6 +54,15 @@ Object.defineProperty(window, 'matchMedia', {
|
|||
})),
|
||||
});
|
||||
|
||||
jest.mock('@clickhouse/click-ui', () => ({
|
||||
CodeBlock: ({ children, language, showLineNumbers }) => (
|
||||
<pre data-testid="mock-codeblock" data-language={language} data-line-numbers={showLineNumbers}>
|
||||
{children}
|
||||
</pre>
|
||||
),
|
||||
ClickUIProvider: ({ children }) => <>{children}</>,
|
||||
}));
|
||||
|
||||
jest.mock('react-i18next', () => {
|
||||
const actual = jest.requireActual('react-i18next');
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue