fix: restore content compatibility checks

This commit is contained in:
2026-09-04 20:49:55 +03:00
parent 55158d490e
commit 7d9e3c2eac
13 changed files with 118 additions and 38 deletions

View File

@@ -2,14 +2,14 @@ import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import BrandIcon from '@/components/BrandIcon.vue';
import content from '@/../content/public/portfolio-content.json';
import { brandIconFor, brandIconLabels } from '@/icons/brand-icons';
import { brandIconAvailable, brandIconFor, brandIconLabels } from '@/icons/brand-icons';
const toolkitLabels = content.toolkit.flatMap((group) => group.technologies.map((technology) => technology.name));
const socialLabels = content.contact.social.map((link) => link.service);
describe('official brand icon registry', () => {
it('resolves every toolkit technology in validated portfolio content', () => {
for (const label of toolkitLabels) {
it('resolves every toolkit technology with an honest official mark', () => {
for (const label of toolkitLabels.filter(brandIconAvailable)) {
const icon = brandIconFor(label);
expect(icon.title).toBeTruthy();
expect(icon.hex).toMatch(/^[0-9A-F]{6}$/u);
@@ -27,10 +27,13 @@ describe('official brand icon registry', () => {
it('keeps the registry closed over all content-facing labels', () => {
expect(brandIconLabels).toEqual([
'Linux', 'Docker', 'Nginx', 'Proxmox / KVM', 'Git', 'Python', 'Vue.js',
'JavaScript', 'C# / .NET', 'Flutter / Dart', 'PostgreSQL / SQL',
'Headless WordPress', 'Java', 'GitHub', 'GitLab', 'LinkedIn',
'Linux', 'Docker', 'Nginx', 'cPanel', 'Authelia', 'Nextcloud', 'Proxmox/KVM',
'Git', 'Python', 'TypeScript/JavaScript', 'Vue.js', 'Flutter/Dart', 'Fastify',
'C#/.NET', 'Headless WordPress', 'Java', 'PostgreSQL', 'Drift/SQLite',
'Drizzle ORM', 'PyTorch', 'Ultralytics/YOLO', 'OpenCV', 'GitHub', 'GitLab', 'LinkedIn',
]);
expect(['DNS', 'TLS', 'Fail2Ban', 'Btrfs', 'rsync', 'SQL', 'SPSS', 'Microsoft Excel', 'SoccerNet']
.every((label) => !brandIconAvailable(label))).toBe(true);
expect(() => brandIconFor('Unlisted technology')).toThrow(/No official brand icon/u);
});