Skip to content

Commit

Permalink
test(chat): update test
Browse files Browse the repository at this point in the history
  • Loading branch information
mortalYoung committed Jan 23, 2025
1 parent 91e5cd6 commit 6c979a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/chat/__tests__/message.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ describe('Test Chat Message', () => {
fireEvent.click(ele!);
});
expect(onCopy).toBeCalledWith('My Name is dt-react-component');

// FIXME:这里应该给 false 表示不支持复制,但是代码里是相反的,最好是反一下
rerender(<Message prompt={prompt} data={prompt.messages} copy />);
rerender(<Message prompt={prompt} data={prompt.messages} copy={false} />);
expect(container.querySelector(classNames)).toBeNull();

onCopy.mockRestore();
Expand Down

0 comments on commit 6c979a3

Please sign in to comment.