Files
ragflow/web/jest-setup.ts

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;