Roo-Code/src/__mocks__/execa.js
Taylor Wilsdon 3f54efca2d
feat: Add Refresh MCP Servers capability, fix state changes in MCP server management UI view (#4267)
* docs: update contributors list [skip ci]

* add refresh all mcp button & supporting logic

* fully working, clean up debug

* begin cleanup

* console debug logging cleanup

* more logging

* Revert "Update contributors list"

* cleanup

* add missing translations

* global and project level i18n strings

* refactor: move translations

* fix: improve MCP settings buttons layout for responsive design

- Add flexWrap to button container to allow wrapping on smaller screens
- Change buttons from fixed flex:1 to flex: 1 1 auto with minWidth
- Ensures buttons maintain minimum readable width of 120px
- Prevents button text from being truncated on narrow viewports

* fix: Add missing vscode mock method and execa mock for McpHub tests

- Added createTextEditorDecorationType to vscode mock in McpHub.test.ts
- Created execa mock to handle ESM module import issues
- Fixes test failure that was exposed by PR #4267's module loading changes

* fix: watch changes on project mcp settings file

---------

Co-authored-by: taylorwilsdon <taylorwilsdon@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-08 07:25:29 -07:00

29 lines
479 B
JavaScript

const execa = jest.fn().mockResolvedValue({
stdout: "",
stderr: "",
exitCode: 0,
failed: false,
killed: false,
signal: null,
timedOut: false,
})
class ExecaError extends Error {
constructor(message) {
super(message)
this.name = "ExecaError"
this.exitCode = 1
this.stdout = ""
this.stderr = message
this.failed = true
this.timedOut = false
this.isCanceled = false
this.killed = false
this.signal = null
}
}
module.exports = {
execa,
ExecaError,
}