Skip to content

Commit

Permalink
Move test file.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnguonly committed Mar 14, 2024
1 parent c46176b commit f789907
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { render, act } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import "@testing-library/jest-dom";
import { ThemeProvider, useThemeContext } from "../ThemeContext";
import { ThemeProvider, useThemeContext } from "../../src/contexts/ThemeContext";

const MockComponent = () => {
const { theme, toggleDarkMode } = useThemeContext();
Expand Down
6 changes: 4 additions & 2 deletions src/components/ChatBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const ChatBar: React.FC = () => {
}
: {};

const avatarStyle = {
const imageStyle = {
filter: isDarkMode ? "invert(1)" : "none",
};

Expand Down Expand Up @@ -522,7 +522,7 @@ const ChatBar: React.FC = () => {
: "../assets/hammer_48.png"
}
onClick={() => handleAvatarClick(message.message)}
style={avatarStyle}
style={imageStyle}
/>
<Message.CustomContent>
<Markdown
Expand Down Expand Up @@ -605,6 +605,7 @@ const ChatBar: React.FC = () => {
className="submit-button"
disabled={submitDisabled || prompt === ""}
onClick={handleSendButtonClick}
style={imageStyle}
>
<img alt="" src="../assets/wand_32.png" />
</IconButton>
Expand All @@ -613,6 +614,7 @@ const ChatBar: React.FC = () => {
className="clear-button"
disabled={submitDisabled}
onClick={handleClearButtonClick}
style={imageStyle}
>
<img alt="Clear messages (cmd + k)" src="../assets/hat_32.png" />
</IconButton>
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"jsx": "react-jsx"
},
"include": [
"src"
"src",
"__tests__",
]
}

0 comments on commit f789907

Please sign in to comment.