refactor(core): Decouple projects telemetry (no-changelog) (#10081)

This commit is contained in:
Iván Ovejero
2024-07-17 11:56:27 +02:00
committed by GitHub
parent ab5688c582
commit 8b2f76b92e
6 changed files with 105 additions and 43 deletions

View File

@@ -4,6 +4,8 @@ import { mock } from 'jest-mock-extended';
import type { BaseCommand } from '@/commands/BaseCommand';
import * as testDb from '../testDb';
import { TelemetryEventRelay } from '@/telemetry/telemetry-event-relay.service';
import { mockInstance } from '@test/mocking';
export const setupTestCommand = <T extends BaseCommand>(Command: Class<T>) => {
const config = mock<Config>();
@@ -19,6 +21,7 @@ export const setupTestCommand = <T extends BaseCommand>(Command: Class<T>) => {
beforeEach(() => {
jest.clearAllMocks();
mockInstance(TelemetryEventRelay);
});
afterAll(async () => {