chore(flags): derive flag-test coords from board-flags source (#1165)

* feat(board-header): show subtitle on /all view

Add all_subtitle copy and render it in the board header when browsing
the aggregated all-directories feed.

* chore(flags): derive flag-test coords from board-flags source

comment-flags.test.ts hard-coded the pol/pony sprite x/y, duplicating the literals already pinned in board-flags.test.ts. A recent sprite remap updated one file and not the other, leaving master red. Derive the coords from getBoardFlagDefinition (the same source the runtime uses) so the assertion can't drift; labels stay literal as readable pins, and board-flags.test.ts remains the single place pinning the actual values.
This commit is contained in:
Tommaso Casaburi
2026-06-08 22:47:04 +07:00
committed by GitHub
parent 182ff0eadc
commit 075b917c36
38 changed files with 82 additions and 40 deletions
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ليس ملفًا", "not_a_file": "ليس ملفًا",
"tor_author_flag_label": "هذا المستخدم يستخدم Tor", "tor_author_flag_label": "هذا المستخدم يستخدم Tor",
"copy_share_link": "نسخ رابط المشاركة", "copy_share_link": "نسخ رابط المشاركة",
"directory_submit_board": "أرسل لوحتك" "directory_submit_board": "أرسل لوحتك",
"all_subtitle": "المنتدى الأعلى تصنيفاً من كل دليل"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ফাইল নয়", "not_a_file": "ফাইল নয়",
"tor_author_flag_label": "এই ব্যবহারকারী Tor ব্যবহার করছেন", "tor_author_flag_label": "এই ব্যবহারকারী Tor ব্যবহার করছেন",
"copy_share_link": "শেয়ার লিংক কপি করুন", "copy_share_link": "শেয়ার লিংক কপি করুন",
"directory_submit_board": "আপনার বোর্ড জমা দিন" "directory_submit_board": "আপনার বোর্ড জমা দিন",
"all_subtitle": "প্রতিটি ডিরেক্টরি থেকে সর্বোচ্চ স্কোর করা বোর্ড"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "není soubor", "not_a_file": "není soubor",
"tor_author_flag_label": "Tento uživatel je na síti Tor", "tor_author_flag_label": "Tento uživatel je na síti Tor",
"copy_share_link": "Kopírovat odkaz pro sdílení", "copy_share_link": "Kopírovat odkaz pro sdílení",
"directory_submit_board": "Odeslat svou nástěnku" "directory_submit_board": "Odeslat svou nástěnku",
"all_subtitle": "Fórum s nejvyšším skóre z každého adresáře"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ikke en fil", "not_a_file": "ikke en fil",
"tor_author_flag_label": "Denne bruger er på Tor", "tor_author_flag_label": "Denne bruger er på Tor",
"copy_share_link": "Kopier delingslinkk", "copy_share_link": "Kopier delingslinkk",
"directory_submit_board": "Indsend dit board" "directory_submit_board": "Indsend dit board",
"all_subtitle": "Forummet med højeste pointtal fra hvert katalog"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "keine Datei", "not_a_file": "keine Datei",
"tor_author_flag_label": "Dieser Benutzer ist auf Tor", "tor_author_flag_label": "Dieser Benutzer ist auf Tor",
"copy_share_link": "Freigabelink kopieren", "copy_share_link": "Freigabelink kopieren",
"directory_submit_board": "Reiche dein Board ein" "directory_submit_board": "Reiche dein Board ein",
"all_subtitle": "Das höchstbewertete Forum aus jedem Verzeichnis"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "δεν είναι αρχείο", "not_a_file": "δεν είναι αρχείο",
"tor_author_flag_label": "Αυτός ο χρήστης είναι στο Tor", "tor_author_flag_label": "Αυτός ο χρήστης είναι στο Tor",
"copy_share_link": "Αντιγραφή ενός συνδέσμου", "copy_share_link": "Αντιγραφή ενός συνδέσμου",
"directory_submit_board": "Υπόβαλε το board σου" "directory_submit_board": "Υπόβαλε το board σου",
"all_subtitle": "Το Φόρουμ με την υψηλότερη βαθμολογία από κάθε κατάλογο"
} }
+2 -1
View File
@@ -425,5 +425,6 @@
"not_a_file": "not a file", "not_a_file": "not a file",
"tor_author_flag_label": "This user is on Tor", "tor_author_flag_label": "This user is on Tor",
"copy_share_link": "Copy share link", "copy_share_link": "Copy share link",
"directory_submit_board": "Submit Your Board" "directory_submit_board": "Submit Your Board",
"all_subtitle": "The highest-scoring board from each directory"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "no es un archivo", "not_a_file": "no es un archivo",
"tor_author_flag_label": "Este usuario está en Tor", "tor_author_flag_label": "Este usuario está en Tor",
"copy_share_link": "Copiar enlace compartido", "copy_share_link": "Copiar enlace compartido",
"directory_submit_board": "Envía tu board" "directory_submit_board": "Envía tu board",
"all_subtitle": "El foro de mayor puntuación de cada directorio"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "فایل نیست", "not_a_file": "فایل نیست",
"tor_author_flag_label": "این کاربر روی Tor است", "tor_author_flag_label": "این کاربر روی Tor است",
"copy_share_link": "کپی کردن لینک اشتراک", "copy_share_link": "کپی کردن لینک اشتراک",
"directory_submit_board": "برد خود را ارسال کنید" "directory_submit_board": "برد خود را ارسال کنید",
"all_subtitle": "تالار بالاترین امتیاز از هر دایرکتوری"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ei ole tiedosto", "not_a_file": "ei ole tiedosto",
"tor_author_flag_label": "Tämä käyttäjä on Torissa", "tor_author_flag_label": "Tämä käyttäjä on Torissa",
"copy_share_link": "Kopioi jakolinkkii", "copy_share_link": "Kopioi jakolinkkii",
"directory_submit_board": "Lähetä boardisi" "directory_submit_board": "Lähetä boardisi",
"all_subtitle": "Korkeimman pistemäärän saanut foorumi jokaisesta hakemistosta"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "hindi file", "not_a_file": "hindi file",
"tor_author_flag_label": "Ang user na ito ay nasa Tor", "tor_author_flag_label": "Ang user na ito ay nasa Tor",
"copy_share_link": "Kopyahin ang link sa pagbabahagi", "copy_share_link": "Kopyahin ang link sa pagbabahagi",
"directory_submit_board": "Isumite ang board mo" "directory_submit_board": "Isumite ang board mo",
"all_subtitle": "Ang pinakamataas na nakakuha ng puntos na Board mula sa bawat direktoryo"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "pas un fichier", "not_a_file": "pas un fichier",
"tor_author_flag_label": "Cet utilisateur est sur Tor", "tor_author_flag_label": "Cet utilisateur est sur Tor",
"copy_share_link": "Copier le lien de partage", "copy_share_link": "Copier le lien de partage",
"directory_submit_board": "Soumettez votre board" "directory_submit_board": "Soumettez votre board",
"all_subtitle": "Le forum de plus haute note de chaque répertoire"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "לא קובץ", "not_a_file": "לא קובץ",
"tor_author_flag_label": "המשתמש הזה נמצא ב-Tor", "tor_author_flag_label": "המשתמש הזה נמצא ב-Tor",
"copy_share_link": "העתק קישור שיתוף", "copy_share_link": "העתק קישור שיתוף",
"directory_submit_board": "שלח את הבורד שלך" "directory_submit_board": "שלח את הבורד שלך",
"all_subtitle": "הפורום בעל הציון הגבוה ביותר מכל ספריה"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "फ़ाइल नहीं है", "not_a_file": "फ़ाइल नहीं है",
"tor_author_flag_label": "यह उपयोगकर्ता Tor पर है", "tor_author_flag_label": "यह उपयोगकर्ता Tor पर है",
"copy_share_link": "शेयर लिंक कॉपी करें", "copy_share_link": "शेयर लिंक कॉपी करें",
"directory_submit_board": "अपना बोर्ड सबमिट करें" "directory_submit_board": "अपना बोर्ड सबमिट करें",
"all_subtitle": "हर डायरेक्टरी से सबसे अधिक स्कोर किया गया फोरम"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "nem fájl", "not_a_file": "nem fájl",
"tor_author_flag_label": "Ez a felhasználó a Tor hálózatán van", "tor_author_flag_label": "Ez a felhasználó a Tor hálózatán van",
"copy_share_link": "Megosztási hivatkozás másolása", "copy_share_link": "Megosztási hivatkozás másolása",
"directory_submit_board": "Küldd be a boardodat" "directory_submit_board": "Küldd be a boardodat",
"all_subtitle": "A legmagasabb pontszámú Fórum minden könyvtárból"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "bukan file", "not_a_file": "bukan file",
"tor_author_flag_label": "Pengguna ini ada di Tor", "tor_author_flag_label": "Pengguna ini ada di Tor",
"copy_share_link": "Salin tautan bagian", "copy_share_link": "Salin tautan bagian",
"directory_submit_board": "Kirim board Anda" "directory_submit_board": "Kirim board Anda",
"all_subtitle": "Forum dengan skor tertinggi dari setiap direktori"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "non è un file", "not_a_file": "non è un file",
"tor_author_flag_label": "Questo utente è su Tor", "tor_author_flag_label": "Questo utente è su Tor",
"copy_share_link": "Copia link condiviso", "copy_share_link": "Copia link condiviso",
"directory_submit_board": "Invia la tua board" "directory_submit_board": "Invia la tua board",
"all_subtitle": "Il board con il punteggio più alto da ogni directory"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ファイルではありません", "not_a_file": "ファイルではありません",
"tor_author_flag_label": "このユーザーはTorを使用しています", "tor_author_flag_label": "このユーザーはTorを使用しています",
"copy_share_link": "シェアリンクをコピー", "copy_share_link": "シェアリンクをコピー",
"directory_submit_board": "掲示板を提出する" "directory_submit_board": "掲示板を提出する",
"all_subtitle": "各ディレクトリから最もスコアの高い掲示板"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "파일이 아님", "not_a_file": "파일이 아님",
"tor_author_flag_label": "이 사용자는 Tor를 사용 중입니다", "tor_author_flag_label": "이 사용자는 Tor를 사용 중입니다",
"copy_share_link": "공유 링크 복사", "copy_share_link": "공유 링크 복사",
"directory_submit_board": "게시판 제출하기" "directory_submit_board": "게시판 제출하기",
"all_subtitle": "각 디렉토리의 가장 높은 점수 게시판"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "फाइल नाही", "not_a_file": "फाइल नाही",
"tor_author_flag_label": "हा वापरकर्ता Tor वर आहे", "tor_author_flag_label": "हा वापरकर्ता Tor वर आहे",
"copy_share_link": "शेअर लिंक कॉपी करा", "copy_share_link": "शेअर लिंक कॉपी करा",
"directory_submit_board": "तुमचा बोर्ड सबमिट करा" "directory_submit_board": "तुमचा बोर्ड सबमिट करा",
"all_subtitle": "प्रत्येक डायरेक्टरीमधील सर्वोच्च स्कोर केलेले फोरम"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "geen bestand", "not_a_file": "geen bestand",
"tor_author_flag_label": "Deze gebruiker zit op Tor", "tor_author_flag_label": "Deze gebruiker zit op Tor",
"copy_share_link": "Delen link kopiëren", "copy_share_link": "Delen link kopiëren",
"directory_submit_board": "Dien je board in" "directory_submit_board": "Dien je board in",
"all_subtitle": "Het Forum met de hoogste score van elke directory"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ikke en fil", "not_a_file": "ikke en fil",
"tor_author_flag_label": "Denne brukeren er på Tor", "tor_author_flag_label": "Denne brukeren er på Tor",
"copy_share_link": "Kopier delingslenke", "copy_share_link": "Kopier delingslenke",
"directory_submit_board": "Send inn boardet ditt" "directory_submit_board": "Send inn boardet ditt",
"all_subtitle": "Forummet med høyest poengsum fra hver katalog"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "to nie plik", "not_a_file": "to nie plik",
"tor_author_flag_label": "Ten użytkownik jest w sieci Tor", "tor_author_flag_label": "Ten użytkownik jest w sieci Tor",
"copy_share_link": "Kopiuj link udostępniania", "copy_share_link": "Kopiuj link udostępniania",
"directory_submit_board": "Prześlij swój board" "directory_submit_board": "Prześlij swój board",
"all_subtitle": "Forum o najwyższej punktacji z każdego katalogu"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "não é um arquivo", "not_a_file": "não é um arquivo",
"tor_author_flag_label": "Este usuário está no Tor", "tor_author_flag_label": "Este usuário está no Tor",
"copy_share_link": "Copiar link compartilhado", "copy_share_link": "Copiar link compartilhado",
"directory_submit_board": "Envie seu board" "directory_submit_board": "Envie seu board",
"all_subtitle": "O Fórum de mais alta pontuação de cada diretório"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "nu este fișier", "not_a_file": "nu este fișier",
"tor_author_flag_label": "Acest utilizator este pe Tor", "tor_author_flag_label": "Acest utilizator este pe Tor",
"copy_share_link": "Copiezi link-ul de partajare", "copy_share_link": "Copiezi link-ul de partajare",
"directory_submit_board": "Trimite boardul tău" "directory_submit_board": "Trimite boardul tău",
"all_subtitle": "Forumul cu cea mai mare punctaj din fiecare director"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "не файл", "not_a_file": "не файл",
"tor_author_flag_label": "Этот пользователь находится в Tor", "tor_author_flag_label": "Этот пользователь находится в Tor",
"copy_share_link": "Копировать ссылку для общего доступа", "copy_share_link": "Копировать ссылку для общего доступа",
"directory_submit_board": "Отправить свою доску" "directory_submit_board": "Отправить свою доску",
"all_subtitle": "Форум с наивысшим рейтингом из каждого каталога"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "nuk është skedar", "not_a_file": "nuk është skedar",
"tor_author_flag_label": "Ky përdorues është në Tor", "tor_author_flag_label": "Ky përdorues është në Tor",
"copy_share_link": "Kopjo lidhjen e ndarjes", "copy_share_link": "Kopjo lidhjen e ndarjes",
"directory_submit_board": "Dërgo bordin tënd" "directory_submit_board": "Dërgo bordin tënd",
"all_subtitle": "Forumi me pikëzimin më të lartë nga secila drejtori"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "inte en fil", "not_a_file": "inte en fil",
"tor_author_flag_label": "Den här användaren är på Tor", "tor_author_flag_label": "Den här användaren är på Tor",
"copy_share_link": "Kopiera delningslänk", "copy_share_link": "Kopiera delningslänk",
"directory_submit_board": "Skicka in ditt board" "directory_submit_board": "Skicka in ditt board",
"all_subtitle": "Forummet med högst poäng från varje katalog"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ఫైల్ కాదు", "not_a_file": "ఫైల్ కాదు",
"tor_author_flag_label": "ఈ వినియోగదారు Tor లో ఉన్నారు", "tor_author_flag_label": "ఈ వినియోగదారు Tor లో ఉన్నారు",
"copy_share_link": "భాగస్వామ్య లింక్‌ను కాపీ చేయండి", "copy_share_link": "భాగస్వామ్య లింక్‌ను కాపీ చేయండి",
"directory_submit_board": "మీ బోర్డును సమర్పించండి" "directory_submit_board": "మీ బోర్డును సమర్పించండి",
"all_subtitle": "ప్రతిదిరెక్టరీ నుండి అత్యధిక స్కోర్ చేసిన ఫోరం"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "ไม่ใช่ไฟล์", "not_a_file": "ไม่ใช่ไฟล์",
"tor_author_flag_label": "ผู้ใช้นี้อยู่บน Tor", "tor_author_flag_label": "ผู้ใช้นี้อยู่บน Tor",
"copy_share_link": "คัดลอกลิงก์แชร์", "copy_share_link": "คัดลอกลิงก์แชร์",
"directory_submit_board": "ส่งบอร์ดของคุณ" "directory_submit_board": "ส่งบอร์ดของคุณ",
"all_subtitle": "กระดานที่ได้คะแนนสูงสุดจากแต่ละไดเรกทอรี่"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "dosya değil", "not_a_file": "dosya değil",
"tor_author_flag_label": "Bu kullanıcı Tor'da", "tor_author_flag_label": "Bu kullanıcı Tor'da",
"copy_share_link": "Paylaşma bağlantısını kopyala", "copy_share_link": "Paylaşma bağlantısını kopyala",
"directory_submit_board": "Panonu Gönder" "directory_submit_board": "Panonu Gönder",
"all_subtitle": "Her dizinden en yüksek skorlu Forum"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "не файл", "not_a_file": "не файл",
"tor_author_flag_label": "Цей користувач у Tor", "tor_author_flag_label": "Цей користувач у Tor",
"copy_share_link": "Копіювати посилання для спільного доступу", "copy_share_link": "Копіювати посилання для спільного доступу",
"directory_submit_board": "Надіслати свою дошку" "directory_submit_board": "Надіслати свою дошку",
"all_subtitle": "Форум з найвищим рейтингом з кожного каталогу"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "فائل نہیں ہے", "not_a_file": "فائل نہیں ہے",
"tor_author_flag_label": "یہ صارف Tor پر ہے", "tor_author_flag_label": "یہ صارف Tor پر ہے",
"copy_share_link": "شیئر لنک کاپی کریں", "copy_share_link": "شیئر لنک کاپی کریں",
"directory_submit_board": "اپنا بورڈ جمع کرائیں" "directory_submit_board": "اپنا بورڈ جمع کرائیں",
"all_subtitle": "ہر ڈائریکٹری سے سب سے زیادہ سکور پیغام بورڈ"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "không phải tệp", "not_a_file": "không phải tệp",
"tor_author_flag_label": "Người dùng này đang ở trên Tor", "tor_author_flag_label": "Người dùng này đang ở trên Tor",
"copy_share_link": "Sao chép liên kết chia sẻ", "copy_share_link": "Sao chép liên kết chia sẻ",
"directory_submit_board": "Gửi bảng của bạn" "directory_submit_board": "Gửi bảng của bạn",
"all_subtitle": "Diễn đàn có điểm cao nhất từ mỗi thư mục"
} }
+2 -1
View File
@@ -406,5 +406,6 @@
"not_a_file": "不是文件", "not_a_file": "不是文件",
"tor_author_flag_label": "该用户正在使用 Tor", "tor_author_flag_label": "该用户正在使用 Tor",
"copy_share_link": "复制分享链接", "copy_share_link": "复制分享链接",
"directory_submit_board": "提交你的版块" "directory_submit_board": "提交你的版块",
"all_subtitle": "来自每个目录的最高评分论坛"
} }
@@ -169,6 +169,7 @@ describe('BoardHeader', () => {
expect(container.textContent).toContain('/all/ - All 5chan Directories'); expect(container.textContent).toContain('/all/ - All 5chan Directories');
expect(container.querySelector('img')?.getAttribute('src')).toBe('banner-a.png'); expect(container.querySelector('img')?.getAttribute('src')).toBe('banner-a.png');
expect(container.textContent).not.toContain('subscriptions_subtitle'); expect(container.textContent).not.toContain('subscriptions_subtitle');
expect(container.textContent).toContain('all_subtitle');
}); });
it('renders a clickable subscriptions subtitle that navigates to subscription settings', async () => { it('renders a clickable subscriptions subtitle that navigates to subscription settings', async () => {
+3 -3
View File
@@ -83,7 +83,7 @@ const BoardHeader = () => {
? '/mod/ - Boards You Moderate' ? '/mod/ - Boards You Moderate'
: defaultCommunity?.title || stableCommunity?.title; : defaultCommunity?.title || stableCommunity?.title;
const subtitle = isInAllView const subtitle = isInAllView
? '' ? t('all_subtitle')
: isInSubscriptionsView : isInSubscriptionsView
? subscriptionsSubtitle ? subscriptionsSubtitle
: isInModView : isInModView
@@ -124,9 +124,9 @@ const BoardHeader = () => {
> >
{subtitle} {subtitle}
</button> </button>
) : isInDirectoryListView ? ( ) : isInDirectoryListView || isInAllView ? (
<span>{subtitle}</span> <span>{subtitle}</span>
) : !isInAllView && !isInModView && subtitle ? ( ) : !isInModView && subtitle ? (
<span title={t('board_address_tooltip')}>{subtitle}</span> <span title={t('board_address_tooltip')}>{subtitle}</span>
) : ( ) : (
subtitle subtitle
+8 -2
View File
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest'; import { describe, expect, it } from 'vitest';
import { getCommentFlagFlairs, getAuthorFlagFlairs, getAuthorFlagViewModels, TOR_AUTHOR_FLAG_LABEL_KEY } from '../comment-flags'; import { getCommentFlagFlairs, getAuthorFlagFlairs, getAuthorFlagViewModels, TOR_AUTHOR_FLAG_LABEL_KEY } from '../comment-flags';
import { getBoardFlagDefinition } from '../board-flags';
describe('comment-flags', () => { describe('comment-flags', () => {
it('parses the pkc-js challenge flair example for country flags', () => { it('parses the pkc-js challenge flair example for country flags', () => {
@@ -21,8 +22,13 @@ describe('comment-flags', () => {
const flags = getAuthorFlagViewModels([{ text: 'flag:country:DE' }, { text: 'flag:pol:AC' }, { text: 'flag:pony:AJ' }], 1000); const flags = getAuthorFlagViewModels([{ text: 'flag:country:DE' }, { text: 'flag:pol:AC' }, { text: 'flag:pony:AJ' }], 1000);
expect(flags.map((flag) => flag.key)).toEqual(['country:de', 'pol:AC', 'pony:AJ']); expect(flags.map((flag) => flag.key)).toEqual(['country:de', 'pol:AC', 'pony:AJ']);
expect(flags[1]).toMatchObject({ label: 'Anarcho-Capitalist', x: 0, y: 0 });
expect(flags[2]).toMatchObject({ label: 'Applejack', x: 48, y: 0 }); // Pin the human-readable labels here, but derive the sprite coords from the board-flags source of
// truth so this test can't drift when the sheet is remapped (board-flags.test.ts pins the values).
const politicalFlag = getBoardFlagDefinition('pol', 'AC');
const ponyFlag = getBoardFlagDefinition('pony', 'AJ');
expect(flags[1]).toMatchObject({ label: 'Anarcho-Capitalist', x: politicalFlag?.x, y: politicalFlag?.y });
expect(flags[2]).toMatchObject({ label: 'Applejack', x: ponyFlag?.x, y: ponyFlag?.y });
}); });
it('labels the xx country flag as Tor traffic', () => { it('labels the xx country flag as Tor traffic', () => {