Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
msveshnikov committed Mar 24, 2024
1 parent 6911edb commit 9acb4f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/__tests__/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ describe("App Component", () => {
});
});

// Add more tests as needed...
});
6 changes: 4 additions & 2 deletions src/components/__tests__/ChatInput.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { render, fireEvent, screen } from "@testing-library/react";
import { render, fireEvent, screen, act } from "@testing-library/react";
import ChatInput from "../ChatInput";
import "@testing-library/jest-dom/extend-expect";
import userEvent from "@testing-library/user-event";
Expand Down Expand Up @@ -42,7 +42,9 @@ describe("ChatInput", () => {
);

const inputField = screen.getByLabelText("Enter your question");
await userEvent.type(inputField, "Test input{enter}");
await act(async () => {
await userEvent.type(inputField, "Test input{enter}");
});

expect(mockOnSubmit).toHaveBeenCalled();
});
Expand Down

0 comments on commit 9acb4f2

Please sign in to comment.