toContain("font-display: block"); expect($css)->not->toContain("font-display: swap"); }); it('dashboard layout preloads both font woff2 files', function () { $tpl = file_get_contents(base_path('resources/views/layouts/dashboard.blade.php')); expect($tpl)->toContain('rel="preload"'); expect($tpl)->toContain('PlusJakartaSans-VariableFont_wght.woff2'); expect($tpl)->toContain('JetBrainsMono-Regular.woff2'); expect($tpl)->toContain('as="font"'); expect($tpl)->toContain('crossorigin'); }); it('guest layout preloads both font woff2 files', function () { $tpl = file_get_contents(base_path('resources/views/layouts/guest.blade.php')); expect($tpl)->toContain('rel="preload"'); expect($tpl)->toContain('PlusJakartaSans-VariableFont_wght.woff2'); expect($tpl)->toContain('JetBrainsMono-Regular.woff2'); }); it('font woff2 files exist in public/fonts', function () { expect(file_exists(base_path('public/fonts/PlusJakartaSans-VariableFont_wght.woff2')))->toBeTrue(); expect(file_exists(base_path('public/fonts/JetBrainsMono-Regular.woff2')))->toBeTrue(); });