From: Jeremy Davis Date: Tue, 16 Nov 2021 17:15:09 +0000 (+0100) Subject: SONAR-15633 Fix test reporting for extensions X-Git-Tag: 9.2.0.49834~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f5394b18b6361d8c95cc5a5977fa6d8f3f8121f4;p=sonarqube.git SONAR-15633 Fix test reporting for extensions --- diff --git a/server/sonar-web/config/jest/ElasticSearchReporter.js b/server/sonar-web/config/jest/ElasticSearchReporter.js index 6610879ae0d..4e49b29f213 100644 --- a/server/sonar-web/config/jest/ElasticSearchReporter.js +++ b/server/sonar-web/config/jest/ElasticSearchReporter.js @@ -19,9 +19,7 @@ */ /* eslint-disable no-console */ - -const fse = require('fs-extra'); -const { tokenToString } = require('typescript'); +const fs = require('fs'); const ES_ITEM_CATEGORY = 'Validate-UT-Frontend'; const ES_ITEM_KIND = 'testcase'; @@ -40,7 +38,7 @@ module.exports = class ElasticSearchReporter { writeToFile(data) { try { - fse.writeJsonSync(this.outputFilepath, data); + fs.writeFileSync(this.outputFilepath, JSON.stringify(data)); } catch (e) { console.error(e); }