/
vshmidt
/
label-studio
Обзор
Документация
Войти
/
vshmidt
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
web/libs/ui/src/lib/code-editor/code-editor.spec.tsx
31 строка
804 B
bmartel
chore: FIT-1413: Collapse all LSF tests to Cypress only (#9439)
24 фев 2026, 00:50
Не верифицирован
24 фев 2026, 00:50
6b6d8a4
Код
Авторство
О чём код?
import { render } from "@testing-library/react"; import CodeEditor from "./code-editor"; // CodeMirror uses Range.prototype.getBoundingClientRect, which jsdom does not provide. beforeAll(() => { if (typeof Range !== "undefined" && !Range.prototype.getBoundingClientRect) { Range.prototype.getBoundingClientRect = function () { const rect = this.getClientRects?.(); if (rect?.[0]) return rect[0]; return { x: 0, y: 0, width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0, toJSON: () => ({}), } as DOMRect; }; } }); describe("CodeEditor", () => { it("should render successfully", () => { const { baseElement } = render(<CodeEditor />); expect(baseElement).toBeTruthy(); }); });