Skip to content

Commit

Permalink
chore: implicitly provide testing tracker with testing api
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelRoux committed Jan 14, 2025
1 parent 0471e41 commit 139b0a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/ngx-matomo-client/testing/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {
MatomoConfiguration,
MatomoFeature,
MatomoTracker,
provideMatomo,
ɵprovideTestingTracker as provideTestingTracker,
} from 'ngx-matomo-client/core';
import { MatomoTestingTracker } from './matomo-testing-tracker';

Expand All @@ -18,9 +20,11 @@ import { MatomoTestingTracker } from './matomo-testing-tracker';
*/
export function provideMatomoTesting(
config: Partial<MatomoConfiguration> | (() => Partial<MatomoConfiguration>) = {},
..._ignored: MatomoFeature[]
...features: MatomoFeature[]
): EnvironmentProviders {
const providers: Provider[] = [
const providers: (Provider | EnvironmentProviders)[] = [
provideMatomo(config as MatomoConfiguration | (() => MatomoConfiguration), ...features),
provideTestingTracker(),
MatomoTestingTracker,
{
provide: MatomoTracker,
Expand Down

0 comments on commit 139b0a7

Please sign in to comment.