Add missing icons, test for missing icons in rules
All checks were successful
CI / Lint (pull_request) Successful in 34s
CI / Test (pull_request) Successful in 59s
Release Drafter / Update release notes draft (pull_request) Successful in 5s

This commit is contained in:
2026-06-29 15:32:48 +02:00
parent 401ed41fcd
commit b18e299eca
2 changed files with 29 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import { getIconNameForTags } from 'marco/utils/osm-icons';
import { getIconNameForTags, POI_ICON_RULES } from 'marco/utils/osm-icons';
import { getIcon } from 'marco/utils/icons';
import { module, test } from 'qunit';
module('Unit | Utility | osm-icons', function () {
@@ -36,4 +37,14 @@ module('Unit | Utility | osm-icons', function () {
let result = getIconNameForTags({ foo: 'bar' });
assert.strictEqual(result, null);
});
test('all icons used in POI_ICON_RULES exist in the icons utility', function (assert) {
for (let rule of POI_ICON_RULES) {
let icon = getIcon(rule.icon);
assert.ok(
icon,
`Icon "${rule.icon}" specified in POI_ICON_RULES should be imported and available in getIcon`
);
}
});
});