Skip to content

Commit af1ab44

Browse files
author
Gérard Collin
committed
Fixed finance tester with currency
1 parent 85a3dbf commit af1ab44

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

plugins/xt-finance/projects/finance-plugin/src/app/test-component/test.component.spec.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { provideZonelessChangeDetection } from '@angular/core';
66
import { registerFinancePlugin } from '../../../../finance/src/lib/register';
77
import { XtResolverService } from 'xt-components';
88
import { provideNoopAnimations } from '@angular/platform-browser/animations';
9+
import { DummyCurrencyComponent } from '../dummy-currency/dummy-currency.component';
910

1011
describe('TestComponent', () => {
1112
let component: TestComponent;
@@ -20,8 +21,17 @@ describe('TestComponent', () => {
2021
.compileComponents();
2122

2223
resolver = TestBed.inject(XtResolverService);
23-
resolver.registerTypes({
24-
currency: 'string'
24+
// Add the currency plugin to allow test
25+
resolver.registerPlugin({
26+
name:'dummy-currency',
27+
components:[{
28+
componentName:'DummyCurrency',
29+
componentClass: DummyCurrencyComponent,
30+
typesHandled:['currency']
31+
}],
32+
types: {
33+
currency: 'string'
34+
}
2535
});
2636

2737
registerFinancePlugin(TestBed.inject(XtResolverService));

0 commit comments

Comments
 (0)