Lighthouse changed
Lighthouse 12 (2024) removed the PWA category. Lighthouse 11 had already dropped the service worker and offline checks. The reasons: install criteria had changed across browsers, and a single score encouraged box-ticking. Lighthouse is still excellent for performance, accessibility, best practices and SEO.
What to use instead
- Chrome and Edge DevTools > Application > Manifest: shows installability errors and warnings, the computed
id, and icon problems. - PWABuilder's report card: checks manifest fields, service worker and security, and offers fixes.
- The PWA.live PWA checker: fetches your page and manifest from our server and lists what passes and what to improve.
- Our manifest validator for quick JSON checks.
Manual test plan
- Install from the browser on desktop and Android; open the app; check the icon, name, splash and theme colour.
- Add to the Home Screen on a real iPhone; check the icon and safe areas.
- Go offline (DevTools, or flight mode) and reload several pages, including one you never visited.
- Deploy a change; confirm the update prompt appears and reloading shows the new version.
- Sign out; confirm private data is gone from caches and IndexedDB.
- Test push permission and a real notification on each platform.
- Repeat on a slow connection (DevTools "Slow 4G").
Automated tests with Playwright
Playwright can wait for the service worker, go offline and check pages still load:
import { test, expect } from '@playwright/test';
test('works offline after first visit', async ({ page, context }) => {
await page.goto('/');
await page.evaluate(async () => { await navigator.serviceWorker.ready; });
await page.reload(); // now controlled by the worker
await context.setOffline(true);
await page.goto('/learn/');
await expect(page.locator('h1')).toBeVisible();
});
test('manifest is valid', async ({ request }) => {
const m = await (await request.get('/manifest.webmanifest')).json();
expect(m.icons.some((i) => i.sizes === '512x512')).toBeTruthy();
});
Mock Service Worker is a different tool with a similar name: it uses a service worker to mock APIs in tests, not to test your PWA.
Lighthouse CI
Keep Lighthouse CI in your pipeline for performance and accessibility budgets, and add your own checks for the manifest and offline behaviour.