Add performance testing to Cypress results

This commit is contained in:
Gabe Kangas
2023-01-04 22:15:10 -08:00
parent 74cbc949ea
commit 80ab351cbe
8 changed files with 3845 additions and 17 deletions

View File

@@ -1,10 +1,17 @@
const { defineConfig } = require('cypress');
const { lighthouse, prepareAudit } = require('@cypress-audit/lighthouse');
module.exports = defineConfig({
projectId: 'wwi3xe',
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
on('before:browser:launch', (browser = {}, launchOptions) => {
prepareAudit(launchOptions);
});
on('task', {
lighthouse: lighthouse(),
});
},
},
});