Skip to content

Commit bd010f8

Browse files
committed
fix jest test
1 parent ac77cab commit bd010f8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/frontend/src/modals/knowledgeBaseUploadModal/__tests__/KnowledgeBaseUploadModal.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ describe("KnowledgeBaseUploadModal", () => {
559559
const validFile = new File(["content"], "valid.md", {
560560
type: "text/markdown",
561561
});
562-
const invalidFile = new File(["content"], "invalid.pdf", {
563-
type: "application/pdf",
562+
const invalidFile = new File(["content"], "invalid.exe", {
563+
type: "application/x-msdownload",
564564
});
565565

566566
// Manually trigger the change event
@@ -573,11 +573,11 @@ describe("KnowledgeBaseUploadModal", () => {
573573
fireEvent.change(folderInput, event);
574574

575575
expect(screen.getByText("valid.md")).toBeInTheDocument();
576-
expect(screen.queryByText("invalid.pdf")).not.toBeInTheDocument();
576+
expect(screen.queryByText("invalid.exe")).not.toBeInTheDocument();
577577

578578
expect(mockSetErrorData).toHaveBeenCalledWith(
579579
expect.objectContaining({
580-
list: expect.arrayContaining(["invalid.pdf"]),
580+
list: expect.arrayContaining(["invalid.exe"]),
581581
}),
582582
);
583583
});

0 commit comments

Comments
 (0)