generated from Seekra/repository-template
test(settings): refactor selection component test
Use exampleOptions instead of an own options array, which was equal to exampleOptions.
This commit is contained in:
@@ -55,18 +55,13 @@ const exampleOptions = [
|
||||
|
||||
describe('Selection', () => {
|
||||
test('displays options correctly', () => {
|
||||
const options = [
|
||||
{ name: 'o0', i18n: 'o0' },
|
||||
{ name: 'o1', i18n: 'o1' },
|
||||
{ name: 'o2', i18n: 'o2' }
|
||||
];
|
||||
const wrapper = getWrapper({ options: options });
|
||||
const wrapper = getWrapper({ options: exampleOptions });
|
||||
|
||||
const listItems = wrapper.findAll('li');
|
||||
expect(listItems.length).toBe(3);
|
||||
|
||||
for (let i = 0; i <= 2; i++) {
|
||||
const option = options[i];
|
||||
const option = exampleOptions[i];
|
||||
const listItem = listItems[i];
|
||||
|
||||
expect(listItem.find('.input-label').text()).toBe(option.i18n);
|
||||
|
||||
Reference in New Issue
Block a user