diff --git a/frontend/src/components/Block/Block.test.jsx b/frontend/src/components/Block/Block.test.tsx similarity index 98% rename from frontend/src/components/Block/Block.test.jsx rename to frontend/src/components/Block/Block.test.tsx index 2e36c4998..7be132e69 100644 --- a/frontend/src/components/Block/Block.test.jsx +++ b/frontend/src/components/Block/Block.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Route, MemoryRouter, Routes } from 'react-router-dom'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import { beforeEach, vi } from 'vitest'; diff --git a/frontend/src/components/FeedbackForm/FeedbackForm.tsx b/frontend/src/components/FeedbackForm/FeedbackForm.tsx index 869dc92e5..35a8018b4 100644 --- a/frontend/src/components/FeedbackForm/FeedbackForm.tsx +++ b/frontend/src/components/FeedbackForm/FeedbackForm.tsx @@ -3,6 +3,7 @@ import { useState, useRef } from "react"; import Question from "../Question/Question"; import Button from "../Button/Button"; import IQuestion from "@/types/Question"; +import { OnResultType } from "@/hooks/useResultHandler"; interface FeedbackFormProps { formActive: boolean; @@ -10,7 +11,7 @@ interface FeedbackFormProps { buttonLabel: string; skipLabel: string; isSkippable: boolean; - onResult: (result: any) => void; + onResult: OnResultType emphasizeTitle?: boolean; } diff --git a/frontend/src/components/HTML/HTML.test.tsx b/frontend/src/components/HTML/HTML.test.tsx new file mode 100644 index 000000000..ddf5af0da --- /dev/null +++ b/frontend/src/components/HTML/HTML.test.tsx @@ -0,0 +1,82 @@ +import { describe, it, expect } from 'vitest'; +import { render } from '@testing-library/react'; +import HTML from './HTML'; + +describe('HTML', () => { + it('renders the HTML content correctly', () => { + const htmlContent = '
Test content
'; + const { container } = render(