diff --git a/tests/items.test.js b/tests/items.test.js index 88e2700..281a922 100644 --- a/tests/items.test.js +++ b/tests/items.test.js @@ -6,6 +6,7 @@ const { iconDefinitions, fileExtensions, fileNames, + languageIds, } = require('./../src/data/items.json'); const colors = require('./../src/data/colors.json'); @@ -16,6 +17,7 @@ function runTests() { testThemeItems(); testFileDefinitions(); + testLanguageIds(); } function testIconColors() { @@ -65,6 +67,16 @@ function testFileDefinitions() { } } +function testLanguageIds() { + for (const languageId in languageIds) { + const itemType = languageIds[languageId]; + + test(`${languageId} has a valid ${itemType} value`, (t) => { + t.true(itemType in iconDefinitions); + }); + } +} + function testIconProp(themeId, propName, condition) { const iconProps = getIconProps(propName); for (const entryName in iconProps) {