GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — client/test at main · sprksocial/client

Expand file tree

/

test

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

test

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
support
support
 
 
README.md
README.md
 
 

README.md

Outline

Testing guide

Spark follows the testing model described by the official Dart testing documentation and Flutter testing overview: keep most tests fast and isolated, use widget tests for observable UI behavior, and reserve integration tests for a small number of important end-to-end flows.

What to test

  • Test public behavior and contracts, not private implementation details.
  • Prioritize repositories, providers, state transitions, error recovery, navigation, and interactions that can regress without an analyzer error.
  • Cover each meaningful branch once at the lowest useful level. Do not repeat a repository contract in provider and widget tests unless the higher-level test verifies distinct wiring or user-visible behavior.
  • Prefer one parameterized or table-driven test when cases share the same setup and assertion shape. Keep separate tests when their failure diagnoses different behavior.
  • Do not add tests for generated code, trivial getters, framework behavior, or static presentation with no Spark-owned logic.

Suite balance

Test counts are not a coverage target. New tests should first address an unrepresented high-risk area rather than deepen an already mature area. In particular, the video editor suite should grow only for a new gesture, timing, race, or media-boundary regression.

The optional local coverage summary groups results by core/<area> and features/<area> so large imbalances remain visible. Passing --enforce-critical makes the local command fail when a core auth or network repository implementation has no executed lines. CI runs the test suite without collecting or enforcing coverage.

Test quality

  • Inject clocks, delays, schedulers, clients, storage, and platform boundaries. Never wait on wall-clock time when a deterministic seam is possible.
  • Use in-memory fakes for owned boundaries and mocks only where interaction verification is the behavior under test.
  • Assert outputs, state, requests, and visible UI. Avoid verify-only tests that merely restate the implementation.
  • Keep tests order-independent and clean up provider containers, controllers, subscriptions, and temporary state.
  • Give tests behavioral names so a failure explains the broken contract.

Commands

Run a targeted file while iterating, then verify the complete suite:

flutter test test/path/to/example_test.dart
flutter test --test-randomize-ordering-seed=random
flutter test --coverage
dart run tool/coverage_summary.dart coverage/lcov.info --enforce-critical

Integration tests live under integration_test/, with one file per major user journey and shared fakes under integration_test/support/. Run a journey on a device with:

flutter test integration_test/registration_test.dart -d <device-id>

Every journey must keep storage and external-service boundaries isolated from real user data.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.