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:
stone-jin
2026-02-24 22:26:24 +08:00
committed by Vincent Koc
parent dee634503b
commit b024a86ec7

View File

@@ -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);