Skip to content

Commit bd664be

Browse files
add a test
1 parent f4e9a23 commit bd664be

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/settings/CheckoutSettings/CheckoutSettings.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ describe('getInitialValues', () => {
152152
});
153153
});
154154

155+
it('should handle missing custom fields in allowedCustomFieldRefIds', () => {
156+
const custom = {
157+
allowedCustomFieldRefIds: ['refId1', 'refId3'],
158+
};
159+
160+
expect(getInitialValues(custom, customFieldsOptions).allowedCustomFieldRefIds).toEqual([{
161+
label: 'Custom Field 1',
162+
value: 'refId1',
163+
}, {
164+
value: 'refId3',
165+
label: 'refId3',
166+
}]);
167+
});
155168
describe('normalize', () => {
156169
it('should normalizes identifiers to prefPatronIdentifier string', () => {
157170
const input = {

0 commit comments

Comments
 (0)