test: remove useless tests#1439
Merged
Merged
Conversation
…tests # Conflicts: # packages/gotrue/test/src/constants_test.dart
grdsdev
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes tests that assert nothing meaningful, duplicate other tests, or only exercise behavior that Dart itself guarantees. No production code or genuinely useful coverage is touched.
406 deletions across 5 test files.
Removed
gotrue/test/src/constants_test.dartconstants are consistent— re-asserts the same constants in different units (DartDurationarithmetic).v20240101 is UTC timestamp— assertsDateTime.parse('...Z').isUtc, a language guarantee.enum names match expected valuestest forOtpType— assertsenum.name, butOtpTypeserializes to the wire via.snakeCase, not.name, so it only exercised Dart's.name. (TheOtpChannelandSignOutScopeequivalents are kept and reworded as wire-value tests, since those enums are serialized via.name.)Enum consistencygroup —toString,==, and set/map usage of enums are all Dart guarantees.Documentation and commentsgroup — re-testsenum.name(duplicates the above).Real-world usage scenariosgroup — tests a local switch helper, arithmetic on hand-built lists, andfromStringround-trips already covered by the keptGenerateLinkTypeExtendedtests.Kept the constant value checks (they guard wire-protocol contracts), the
jsName/fromString/snakeCasemapping tests, the customApiVersions.name/timestampgetters, and the enum-membership (values/contains) checks.gotrue/test/src/types/auth_exception_test.dartall exception types implement Exceptionandall exception types extend AuthException— assert declared inheritance, fully redundant with the per-subclassextends AuthExceptiontests.postgrest/test/transforms_test.dartmaxAffectedgroup (5returnsNormallysmoke tests) — redundant with themaxAffected integrationgroup right below it, which actually asserts the resultingPreferheaders.supabase/test/client_test.dartSchema Support,RPC Support,Client Optionsgroups — only assert that statically-typed methods return their declared type (tautologicalisA); real coverage lives inmock_test.dartandpostgrest/test/basic_test.dart.Query Schemagroup — exact duplicate ofSchema Support.should properly dispose all resources— no assertions; dispose is covered with real assertions by the keptShared YAJsonIsolategroup.supabase_flutter/test/supabase_flutter_test.dartEmptyLocalStoragetests — fully subsumed by the keptall methods work together in a typical flowtest, which asserts the same contract end to end.Test plan
dart analyzepasses on all five files (no unused imports left behind).constants_test/auth_exception_test, supabaseclient_test, and supabase_fluttersupabase_flutter_testall pass.postgrest/transforms_testis an integration suite needing a local PostgREST server, untouched logic.