Skip to content

Commit 81abc32

Browse files
committed
fix: export MATOMO_TESTING_INSTANCE token
relates to #108
1 parent 473be55 commit 81abc32

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

projects/ngx-matomo-client/testing/matomo-testing-instance.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
import { InjectionToken } from '@angular/core';
12
import { MatomoECommerceItem, MatomoInstance } from 'ngx-matomo-client/core';
23

4+
export const MATOMO_TESTING_INSTANCE = new InjectionToken<MatomoInstance>(
5+
'MATOMO_TESTING_INSTANCE',
6+
{
7+
factory: () => new MatomoTestingInstance(),
8+
},
9+
);
10+
311
/**
412
* No-op implementation of {@link MatomoInstance}
513
*/

projects/ngx-matomo-client/testing/matomo-testing-tracker.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
import { inject, Injectable, InjectionToken } from '@angular/core';
1+
import { inject, Injectable } from '@angular/core';
22
import { MatomoInstance, MatomoTracker } from 'ngx-matomo-client/core';
3-
import { MatomoTestingInstance } from './matomo-testing-instance';
4-
5-
export const MATOMO_TESTING_INSTANCE = new InjectionToken<MatomoInstance>(
6-
'MATOMO_TESTING_INSTANCE',
7-
{
8-
factory: () => new MatomoTestingInstance(),
9-
},
10-
);
3+
import { MATOMO_TESTING_INSTANCE } from './matomo-testing-instance';
114

125
/**
136
* No-op implementation of {@link MatomoTracker}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export { provideMatomoTesting } from './providers';
22
export { MatomoTestingModule } from './matomo-testing.module';
33
export { MatomoTestingTracker } from './matomo-testing-tracker';
4-
export { MatomoTestingInstance } from './matomo-testing-instance';
4+
export { MatomoTestingInstance, MATOMO_TESTING_INSTANCE } from './matomo-testing-instance';

0 commit comments

Comments
 (0)