Skip to content

Commit

Permalink
kind --> platform
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasyishak committed Nov 10, 2023
1 parent 5f63397 commit 1d90674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions pkgs/unified_analytics/lib/src/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ final class Event {
/// An event that reports when the code size measurement is run
/// via `--analyze-size`.
///
/// [kind] - string identifier for which platform was run "ios", "apk",
/// [platform] - string identifier for which platform was run "ios", "apk",
/// "aab", etc.
Event.codeSizeAnalysis({required String kind})
Event.codeSizeAnalysis({required String platform})
: eventName = DashEvent.codeSizeAnalysis,
eventData = {'kind': kind};
eventData = {
'platform': platform,
};

/// Event that is emitted periodically to report the number of times a given
/// command has been executed.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/unified_analytics/test/event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@ void main() {
});

test('Event.codeSizeAnalysis constructed', () {
Event generateEvent() => Event.codeSizeAnalysis(kind: 'kind');
Event generateEvent() => Event.codeSizeAnalysis(platform: 'platform');

final constructedEvent = generateEvent();

expect(generateEvent, returnsNormally);
expect(constructedEvent.eventName, DashEvent.codeSizeAnalysis);
expect(constructedEvent.eventData['kind'], 'kind');
expect(constructedEvent.eventData['platform'], 'platform');
expect(constructedEvent.eventData.length, 1);
});

Expand Down

0 comments on commit 1d90674

Please sign in to comment.