From 2724f05d5ea6acfa6a7a04f786df0e5fa38de780 Mon Sep 17 00:00:00 2001 From: Steven Vachon Date: Mon, 25 May 2020 19:28:35 -0400 Subject: [PATCH] @grafana/e2e: Avoid Cypress' issue with JSON file reporter (#25092) https://github.com/cypress-io/cypress/issues/6406 --- packages/grafana-e2e/cypress/plugins/extendConfig.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/grafana-e2e/cypress/plugins/extendConfig.js b/packages/grafana-e2e/cypress/plugins/extendConfig.js index 1fda6f2a969..56561f108c9 100644 --- a/packages/grafana-e2e/cypress/plugins/extendConfig.js +++ b/packages/grafana-e2e/cypress/plugins/extendConfig.js @@ -11,10 +11,13 @@ module.exports = async baseConfig => { } = baseConfig; if (CWD) { + // @todo: https://github.com/cypress-io/cypress/issues/6406 + const jsonReporter = require.resolve('@mochajs/json-file-reporter'); + const projectConfig = { fixturesFolder: `${CWD}/cypress/fixtures`, integrationFolder: `${CWD}/cypress/integration`, - reporter: '@mochajs/json-file-reporter', // putting this in cypress.json caused weird errors + reporter: jsonReporter, reporterOptions: { output: `${CWD}/cypress/report.json`, },