mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-04 11:05:47 +00:00
Fix unit tests to match current implementation
- Add timeout parameter to all executeSwiftCli calls - Update image tool tests to include --capture-focus parameter - All tests now pass (206 passed, 65 skipped as expected) Fixes failing CI tests in Node.js 20.x environment.
This commit is contained in:
parent
7b8b7f5fe1
commit
4b9ab04878
1 changed files with 3 additions and 0 deletions
|
|
@ -146,6 +146,7 @@ describe("List Tool", () => {
|
|||
expect(mockExecuteSwiftCli).toHaveBeenCalledWith(
|
||||
["list", "apps"],
|
||||
mockLogger,
|
||||
expect.objectContaining({ timeout: expect.any(Number) })
|
||||
);
|
||||
expect(result.content[0].text).toContain("Found 2 running applications");
|
||||
expect(result.content[0].text).toContain(
|
||||
|
|
@ -205,6 +206,7 @@ describe("List Tool", () => {
|
|||
"ids,bounds,off_screen",
|
||||
],
|
||||
mockLogger,
|
||||
expect.objectContaining({ timeout: expect.any(Number) })
|
||||
);
|
||||
expect(result.content[0].text).toContain(
|
||||
"Found 2 windows for application: Safari (com.apple.Safari) - PID: 1234",
|
||||
|
|
@ -767,6 +769,7 @@ describe("List Tool", () => {
|
|||
expect(mockExecuteSwiftCli).toHaveBeenCalledWith(
|
||||
["list", "windows", "--app", "TestApp"],
|
||||
mockLogger,
|
||||
expect.objectContaining({ timeout: expect.any(Number) })
|
||||
);
|
||||
expect(result.content[0].text).toContain('"Test Window"');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue