test: Refactor and tests Symbols command#25
Merged
miquelbeltran merged 6 commits intomainfrom Jun 18, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Symbols feature to improve testability and adds comprehensive unit tests for the symbols commands and API.
- Extracts symbol commands into a
SymbolsCommandclass and removes legacyflutter_symbols_*files - Implements
SymbolsApiwith multipart builder and adds tests + mocks for upload, list, and delete operations - Updates
pubspec.yamlto include Mockito and build_runner; addsAGENT.mddocumentation
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/symbols/symbols_command.dart | New SymbolsCommand class replaces old flow, with run and parser methods |
| lib/src/symbols/symbols_api.dart | Consolidated Flutter symbols API into a class with multipart builder |
| lib/raygun_cli.dart | Updated export to the new symbols_command.dart |
| test/symbols/ symbols_command_test.dart | Unit tests for SymbolsCommand covering upload/list/delete |
| test/symbols/ symbols_api_test.dart | Unit tests for SymbolsApi, with Mockito mocks |
| test/symbols/ *.mocks.dart | Generated mock classes for API and HTTP client |
| pubspec.yaml | Added mockito and build_runner to dev dependencies |
| AGENT.md | New guide documenting build/test commands and architecture |
Comments suppressed due to low confidence (1)
lib/src/core/raygun_command.dart:16
- [nitpick] The abstract method
buildParserSymbolsis specific to symbols; consider renaming it to a genericbuildParserto better support other command implementations.
ArgParser buildParserSymbols();
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.
test: Refactor and tests Symbols command
Description 📝
Type of change
Updates
AGENT.mdfor coding assistants.Test plan 🧪
Tested commands, e.g.
Author to check 👓
Reviewer to check ✔️