mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-28 10:20:08 +02:00
Test custom properties
This commit is contained in:
parent
5dbea2825a
commit
a67d143e40
|
@ -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),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue