[TLC-254] Take config data service out of constructor, make optional

This commit is contained in:
Kim Shepherd
2022-05-04 14:53:47 +12:00
parent 5363ae1ac1
commit 2fbf33b641
2 changed files with 12 additions and 8 deletions

View File

@@ -897,10 +897,10 @@ describe('FormBuilderService test suite', () => {
});
it(`should request the ${typeFieldProp} property and set value "dc_type"`, () => {
// This should have been called in the service constructor
const typeValue = service.getTypeField();
expect(configSpy.findByPropertyName).toHaveBeenCalledTimes(1);
expect(configSpy.findByPropertyName).toHaveBeenCalledWith(typeFieldProp);
expect(service.getTypeField()).toEqual('dc_type');
expect(typeValue).toEqual('dc_type');
});
});