feat: integrate Lighthouse in MobilePerformanceMonitor
This commit is contained in:
@@ -12,4 +12,14 @@ test.describe('MobilePerformanceMonitor', () => {
|
||||
expect(vitals.LCP).toBeGreaterThan(0);
|
||||
expect(vitals.CLS).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
test('should run Lighthouse audit', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
const monitor = new MobilePerformanceMonitor(page);
|
||||
|
||||
const result = await monitor.runLighthouseAudit(page.url());
|
||||
|
||||
expect(result.score).toBeGreaterThan(0);
|
||||
expect(result.audits).toBeDefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user