Created
April 2, 2021 18:46
-
-
Save mdcruz/2d786be6a708bfa57cf79ed0d3a45e2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Lighthouse', () => { | |
it('should run performance audits using custom thresholds', () => { | |
cy.visit('/'); | |
const customThresholds = { | |
performance: 50, | |
accessibility: 50, | |
seo: 70, | |
'first-contentful-paint': 2000, | |
'largest-contentful-paint': 3000, | |
'cumulative-layout-shift': 0.1, | |
'total-blocking-time': 500, | |
}; | |
const desktopConfig = { | |
formFactor: 'desktop', | |
screenEmulation: { disabled: true }, | |
}; | |
cy.lighthouse(customThresholds, desktopConfig); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment