5180 fichiers 38.5 Mo 0 téléchargements 215 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / css / rare-values / RareValuesAirText.test.ts
RareValuesAirText.test.ts 1.4 Ko Télécharger le fichier
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';

const css = readFileSync(join(process.cwd(), 'src/css/rare-values/RareValuesAirText.css'), 'utf8');
const view = readFileSync(join(process.cwd(), 'src/components/rare-values/RareValuesView.tsx'), 'utf8');

describe('rare values text (AIR conventions, no AIR layout)', () => {
    it('is regular Ubuntu at 12 px', () => {
        expect(css).toMatch(/\.octane-rare-values-window \{[^}]*HabboAirUbuntu[^}]*font-size: 12px/);
        expect(css).toMatch(/@layer base \{\s*\.octane-rare-values-window :where\(\*\):not\(svg, svg \*\) \{[^}]*HabboAirUbuntu, UbuntuRegular, sans-serif !important/);
        expect(view).toContain("import '../../css/rare-values/RareValuesAirText.css'");
        expect(view).toContain('octane-rare-values-window');
    });

    it('draws names u_regular 12, values u_bold 12 and the meta lines il_regular 11', () => {
        expect(view).not.toContain('text-[13px]');
        // u_regular body text is pure black (#000), not the earlier #1f2d34.
        expect(view).toContain('className="grow text-[12px] text-black"');
        expect(view).not.toContain('text-[#1f2d34]');
        expect(view).toMatch(/<Text bold textEnd className="text-\[12px\]/);
        expect(view).toContain('<Text className="text-[11px] text-black/45">');
    });
});
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser