Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Illya Tsai authored and Illya Tsai committed May 6, 2024
1 parent 2bfd4c5 commit 87db8b4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ void main() {

test('track calls rudderClient.track', () async {
const String eventName = 'test_event_name';

const Map <String, dynamic> properties = <String, dynamic>{};
final bool result = await derivRudderstack.track(eventName: eventName, properties: <String, dynamic>{});

expect(result, isTrue);
verify(() => mockRudderController.track(eventName)).called(1);
verify(() => mockRudderController.track(eventName, properties: RudderProperty.fromMap(properties))).called(1);
});

test('track calls rudderClient.track', () async {
const String eventName = 'test_event_name';
const Map <String, dynamic> properties = <String, dynamic>{};

final bool result = await derivRudderstack.track(eventName: eventName, properties: <String, dynamic>{});

expect(result, isTrue);
verify(() => mockRudderController.track(eventName)).called(1);
verify(() => mockRudderController.track(eventName, properties: RudderProperty.fromMap(properties))).called(1);
});

test('screen calls rudderClient.screen', () async {
Expand Down

0 comments on commit 87db8b4

Please sign in to comment.