Skip to content

Commit

Permalink
fix(spa-observability): completely mock @sentry/angular-ivy as a hack…
Browse files Browse the repository at this point in the history
… to avoid jest resolver issues
  • Loading branch information
timonmasberg committed Nov 6, 2023
1 parent d860ac3 commit e1a2bab
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { SpectatorService, createServiceFactory } from '@ngneat/spectator/jest';
import * as SentryAngularIvy from '@sentry/angular-ivy';

import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest';
import { AUTH_SERVICE, DevAuthService } from '@kordis/spa/auth';

import { SentryObservabilityService } from './sentry-observability.service';

// https://github.com/getsentry/sentry-javascript/issues/9448
// @formatter:off
import * as SentryAngularIvy from '@sentry/angular-ivy';
jest.mock('@sentry/angular-ivy', () => ({ setUser: () => {} }));
const sentrySetUser = jest.spyOn(SentryAngularIvy, 'setUser');
// @formatter:on

describe('SentryObservabilityService', () => {
let spectator: SpectatorService<SentryObservabilityService>;
Expand Down

0 comments on commit e1a2bab

Please sign in to comment.