From 05d267954cde3e072f58079cb258b7edcbfd58b1 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Tue, 8 Oct 2024 09:40:41 +0200 Subject: [PATCH] test(core): Add community+ register tracking test (#11133) --- .../__tests__/telemetry-event-relay.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts index 6eecb8e812..df65a70ecb 100644 --- a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts +++ b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts @@ -1057,4 +1057,20 @@ describe('TelemetryEventRelay', () => { ); }); }); + + describe('Community+ registered', () => { + it('should track `license-community-plus-registered` event', () => { + const event: RelayEventMap['license-community-plus-registered'] = { + email: 'user@example.com', + licenseKey: 'license123', + }; + + eventService.emit('license-community-plus-registered', event); + + expect(telemetry.track).toHaveBeenCalledWith('User registered for license community plus', { + email: 'user@example.com', + licenseKey: 'license123', + }); + }); + }); });