generated from Seekra/repository-template
style: ensure semicolons at line ends
This commit is contained in:
@@ -237,7 +237,7 @@ describe('Selection', () => {
|
||||
const inputO2 = inputs[2];
|
||||
|
||||
await check(inputO0);
|
||||
expectSelectionValue(['o0'])
|
||||
expectSelectionValue(['o0']);
|
||||
|
||||
await uncheck(inputO0);
|
||||
expectSelectionValue([]);
|
||||
|
||||
@@ -32,7 +32,7 @@ const getWrapper = function getWrapper({ type = 'string', i18n = 'input', defaul
|
||||
path: 'input'
|
||||
}
|
||||
}, {}, [], piniaOptions);
|
||||
}
|
||||
};
|
||||
|
||||
describe('SettingsInput', () => {
|
||||
test('uses correct input type', () => {
|
||||
|
||||
@@ -117,7 +117,7 @@ describe('Switch', () => {
|
||||
|
||||
const wrapper = getWrapper({
|
||||
translations: { switch1: translation }
|
||||
})
|
||||
});
|
||||
|
||||
const label = wrapper.find('label');
|
||||
expect(label.text()).toBe(translation);
|
||||
|
||||
@@ -59,5 +59,5 @@ describe('settingsPage', () => {
|
||||
])('returns $expected', async ({ path, expected }) => {
|
||||
expect(getSettingsPagePathSegments(path)).toStrictEqual(expected);
|
||||
});
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
@@ -527,8 +527,8 @@ describe('settingsValidator', () => {
|
||||
]
|
||||
} }
|
||||
])('throws error', ({ settings }) => {
|
||||
expect(() => validateSettingsConfig(settings)).toThrow(Error)
|
||||
})
|
||||
expect(() => validateSettingsConfig(settings)).toThrow(Error);
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateEntry', () => {
|
||||
|
||||
@@ -20,7 +20,7 @@ export const assertString = function assertString (value, path) {
|
||||
if (typeof value !== 'string' || value.trim() === '') {
|
||||
throw new Error(`[settings] "${path}" must be a non-empty string`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const assertType = function assertType (value, path) {
|
||||
if (!VALID_TYPES.includes(value)) {
|
||||
@@ -28,7 +28,7 @@ export const assertType = function assertType (value, path) {
|
||||
`[settings] "${path}" has invalid type "${value}". Must be one of: ${VALID_TYPES.join(', ')}`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const validateSelectionOptions = function validateSelectionOptions (options, path) {
|
||||
if (!Array.isArray(options) || options.length === 0) {
|
||||
@@ -38,7 +38,7 @@ export const validateSelectionOptions = function validateSelectionOptions (optio
|
||||
assertString(opt.name, `${path}.options[${i}].name`);
|
||||
assertString(opt.i18n, `${path}.options[${i}].i18n`);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const validateEntry = function validateEntry (entry, path) {
|
||||
assertType(entry.type, `${path}.type`);
|
||||
@@ -96,7 +96,7 @@ export const validateEntry = function validateEntry (entry, path) {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const validateFirstLevelSection = function validateFirstLevelSection (section, path) {
|
||||
assertString(section.name);
|
||||
@@ -126,4 +126,4 @@ export function validateSettingsConfig(raw) {
|
||||
raw.contents.forEach((entry, i) =>
|
||||
validateFirstLevelSection(entry, `contents[${i}]`)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user