mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 09:25:00 +00:00
refactor(tests): simplify listTabs initialization in agent snapshot tests
Updated the initialization of listTabs in the agent snapshot tests for better readability by removing unnecessary line breaks. This change enhances code clarity without altering the test logic.
This commit is contained in:
@@ -24,9 +24,7 @@ describe("resolveTargetIdAfterNavigate", () => {
|
||||
const result = await resolveTargetIdAfterNavigate({
|
||||
oldTargetId: "old-123",
|
||||
navigatedUrl: "https://example.com",
|
||||
listTabs: staticListTabs([
|
||||
{ targetId: "new-456", url: "https://example.com" },
|
||||
]),
|
||||
listTabs: staticListTabs([{ targetId: "new-456", url: "https://example.com" }]),
|
||||
});
|
||||
expect(result).toBe("new-456");
|
||||
});
|
||||
@@ -95,9 +93,7 @@ describe("resolveTargetIdAfterNavigate", () => {
|
||||
const result$ = resolveTargetIdAfterNavigate({
|
||||
oldTargetId: "old-123",
|
||||
navigatedUrl: "https://single-tab.com",
|
||||
listTabs: staticListTabs([
|
||||
{ targetId: "only-tab", url: "https://some-other.com" },
|
||||
]),
|
||||
listTabs: staticListTabs([{ targetId: "only-tab", url: "https://some-other.com" }]),
|
||||
});
|
||||
|
||||
await vi.advanceTimersByTimeAsync(800);
|
||||
|
||||
Reference in New Issue
Block a user