Skip to content

fix(tabs): restore findTabById undefined contract #23

Description

@atldays

Problem

findTabById(tabId) currently returns getTab(tabId) without await inside its try block. Because getTab() rejects asynchronously, the catch is never reached.

Observed consequences:

  • a missing tab rejects instead of returning undefined as documented;
  • the dedicated Tab id "..." not exist branch in getTabUrl() is unreachable;
  • callers observe the lower-level browser error instead.

Proposed follow-up

Change the implementation to return await getTab(tabId) and add focused regression coverage for both findTabById() and getTabUrl().

This is intentionally separate from the framework-agnostic testing-kit work because it changes observable behavior of two public functions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions