mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-13 04:13:35 +08:00
8 lines
337 B
TypeScript
8 lines
337 B
TypeScript
import '@testing-library/jest-dom';
|
|
import React from 'react';
|
|
|
|
// esbuild-jest compiles JSX with the classic runtime (React.createElement),
|
|
// while source files rely on the automatic runtime and never import React.
|
|
// Expose React globally so rendering components in tests works.
|
|
(globalThis as Record<string, unknown>).React = React;
|