Test custom properties

This commit is contained in:
Lahiru Himesh Madusanka 2024-05-14 09:32:43 +05:30
parent 5dbea2825a
commit a67d143e40
No known key found for this signature in database
GPG key ID: 76FA166617B1D041

View file

@ -713,4 +713,24 @@ describe('templates', () => {
});
});
});
describe('customProperties', () => {
const choices = [
{
label: 'test',
value: 'test',
customProperties: {
customProp1: 'test1',
customProp2: 'test2',
},
},
];
it('sets custom properties', () => {
const output = templates.option(choices[0]);
expect(output.dataset.customProperties).to.equal(
JSON.stringify(choices[0].customProperties),
);
});
});
});