From 1046bafee27fdd8b2d980da71919268ae13f9067 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Tue, 25 Oct 2022 17:04:30 +0300 Subject: [PATCH] test(cypress): Code coverage --- cypress.config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cypress.config.js b/cypress.config.js index 05791abb..30be8ac3 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,24 +1,26 @@ -const { defineConfig } = require("cypress"); +const { defineConfig } = require('cypress'); module.exports = defineConfig({ viewportWidth: 1280, defaultCommandTimeout: 8888, chromeWebSecurity: false, - reporter: "junit", + reporter: 'junit', video: true, retries: { runMode: 8, openMode: 0, }, reporterOptions: { - mochaFile: "cypress/reports/cypress-[hash].xml", + mochaFile: 'cypress/reports/cypress-[hash].xml', jenkinsMode: true, toConsole: true, }, e2e: { setupNodeEvents(on, config) { // e2e testing node events setup code + require('@cypress/code-coverage/task')(on, config); + return config; }, - baseUrl: "http://localhost:3000", + baseUrl: 'http://localhost:3000', }, });