]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15633 Fix test reporting for extensions
authorJeremy Davis <jeremy.davis@sonarsource.com>
Tue, 16 Nov 2021 17:15:09 +0000 (18:15 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 17 Nov 2021 20:03:38 +0000 (20:03 +0000)
server/sonar-web/config/jest/ElasticSearchReporter.js

index 6610879ae0d7b00fd705cfe0155aed20727200af..4e49b29f2132e66d258618ac304e2c349ad682fc 100644 (file)
@@ -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);
     }