Skip to content

test(auth,performance): remove unused testExceptionHandling helpers - #18795

Merged
kevmoo merged 1 commit into
firebase:mainfrom
natebosch:drop-unused-test-helpers
Oct 14, 2026
Merged

kevmoo merged 1 commit into
firebase:mainfrom
natebosch:drop-unused-test-helpers

Conversation

@natebosch

Copy link
Copy Markdown
Contributor

The testExceptionHandling helpers in the firebase_auth and
firebase_performance platform interface tests have no callers. They also
contain an assertion that doesn't do what it appears to:

await expectLater(
  () async => testMethod(),
  anyOf([
    completes,
    if (type == 'PLATFORM' || type == 'EXCEPTION')
      throwsA(isA<FirebaseException>()),
  ]),
);

completes only matches a Future, and the value here is a closure, so
that branch can never match. When type is 'PLATFORM' or 'EXCEPTION'
the anyOf behaves like throwsA(...) alone, and for any other type the
assertion always fails. In addition, anyOf can't combine asynchronous
matchers: it treats the pending result from throwsA as a match, and
expectLater doesn't wait for the real result.

An upcoming change to package:matcher makes anyOf and isNot throw an
ArgumentError when they are used with asynchronous matchers like these,
which would break these helpers if they were ever called again:
dart-lang/test#2792

Remove the helpers and the imports they used.

The `testExceptionHandling` helpers in the firebase_auth and
firebase_performance platform interface tests have no callers. They also
contain an assertion that doesn't do what it appears to:

    await expectLater(
      () async => testMethod(),
      anyOf([
        completes,
        if (type == 'PLATFORM' || type == 'EXCEPTION')
          throwsA(isA<FirebaseException>()),
      ]),
    );

`completes` only matches a `Future`, and the value here is a closure, so
that branch can never match. When `type` is `'PLATFORM'` or `'EXCEPTION'`
the `anyOf` behaves like `throwsA(...)` alone, and for any other `type` the
assertion always fails. In addition, `anyOf` can't combine asynchronous
matchers: it treats the pending result from `throwsA` as a match, and
`expectLater` doesn't wait for the real result.

An upcoming change to `package:matcher` makes `anyOf` and `isNot` throw an
`ArgumentError` when they are used with asynchronous matchers like these,
which would break these helpers if they were ever called again:
dart-lang/test#2792

Remove the helpers and the imports they used.
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@natebosch

Copy link
Copy Markdown
Contributor Author

@kevmoo - do you know who can help land this?

@kevmoo
kevmoo merged commit 29cc1d4 into firebase:main Oct 14, 2026
39 checks passed
@firebase firebase locked and limited conversation to collaborators Nov 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants