Skip to content

Commit cfdaeb3

Browse files
author
FrancescoMauto
committed
[DSC-1786] edit: klaro lazy injection token provided in test spec
1 parent b96e5b3 commit cfdaeb3

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/app/shared/cookies/browser-klaro.service.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
import {
2929
BrowserKlaroService,
3030
COOKIE_MDFIELD,
31+
LAZY_KLARO,
3132
} from './browser-klaro.service';
3233
import { ANONYMOUS_STORAGE_NAME_KLARO } from './klaro-configuration';
3334

@@ -110,6 +111,10 @@ describe('BrowserKlaroService', () => {
110111
provide: ConfigurationDataService,
111112
useValue: configurationDataService,
112113
},
114+
{
115+
provide: LAZY_KLARO,
116+
useValue: Promise.resolve({ setup: () => {/* noop */} }),
117+
},
113118
],
114119
});
115120
service = TestBed.inject(BrowserKlaroService);

src/app/shared/cookies/browser-klaro.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const updateDebounce = 300;
8282
/**
8383
* By using this injection token instead of importing directly we can keep Klaro out of the main bundle
8484
*/
85-
const LAZY_KLARO = new InjectionToken<Promise<any>>(
85+
export const LAZY_KLARO = new InjectionToken<Promise<any>>(
8686
'Lazily loaded Klaro',
8787
{
8888
providedIn: 'root',

0 commit comments

Comments
 (0)