mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fix tests
This commit is contained in:
@@ -41,6 +41,7 @@ describe("ChatTextArea", () => {
|
||||
// Default mock implementation for useExtensionState
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
apiConfiguration: {
|
||||
apiProvider: "anthropic",
|
||||
},
|
||||
@@ -51,6 +52,7 @@ describe("ChatTextArea", () => {
|
||||
it("should be disabled when textAreaDisabled is true", () => {
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
})
|
||||
|
||||
render(<ChatTextArea {...defaultProps} textAreaDisabled={true} />)
|
||||
@@ -68,6 +70,7 @@ describe("ChatTextArea", () => {
|
||||
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
apiConfiguration,
|
||||
})
|
||||
|
||||
@@ -85,6 +88,7 @@ describe("ChatTextArea", () => {
|
||||
it("should not send message when input is empty", () => {
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
apiConfiguration: {
|
||||
apiProvider: "openrouter",
|
||||
},
|
||||
@@ -101,6 +105,7 @@ describe("ChatTextArea", () => {
|
||||
it("should show loading state while enhancing", () => {
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
apiConfiguration: {
|
||||
apiProvider: "openrouter",
|
||||
},
|
||||
@@ -123,6 +128,7 @@ describe("ChatTextArea", () => {
|
||||
// Update apiConfiguration
|
||||
;(useExtensionState as jest.Mock).mockReturnValue({
|
||||
filePaths: [],
|
||||
openedTabs: [],
|
||||
apiConfiguration: {
|
||||
apiProvider: "openrouter",
|
||||
newSetting: "test",
|
||||
|
||||
Reference in New Issue
Block a user