From 975e625d5e432a6710e21c4e4f2e5d25a280bdfb Mon Sep 17 00:00:00 2001 From: Taha Paksu Date: Mon, 2 Mar 2020 12:26:41 +0300 Subject: [PATCH] Fix index file path and title mismatch --- README.md | 1 + index.js | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5188b8c..733f8eb 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ In lieu of a formal styleguide take care to maintain the existing coding style. * 0.1.0 - added more source line definitions such as "@file?id:line:pos" and " at Anonymous function (file?id:line:pos) for parsing, - added folder separation by browser type, - fixed some exceptions +* 0.1.1 - fixed index file title and path mismatch ## Author diff --git a/index.js b/index.js index dd397dc..bec4ba3 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /** - * karma-code-reporter v0.1.0 + * karma-code-reporter v0.1.1 * * Copyright 2017 Taha PAKSU * @@ -37,8 +37,6 @@ var codeReporter = function (baseReporterDecorator, config, logger, helper, form var basePath = __dirname; /* created files array */ var createdFiles = []; - /* created file titles array */ - var fileTitles = []; /** * Event triggered when browsers are ready and execution starts @@ -115,8 +113,10 @@ var codeReporter = function (baseReporterDecorator, config, logger, helper, form // create file this.createFile(outputFilename, html); // push the created file path and title to an array for building the index page - createdFiles.push(outputFilename); - fileTitles.push(failedSpecList[i].browser.name + " - " + failedSpecList[i].result.description); + createdFiles.push({ + title: failedSpecList[i].browser.name + " - " + failedSpecList[i].result.description, + path: outputFilename + }); } } } @@ -177,9 +177,9 @@ var codeReporter = function (baseReporterDecorator, config, logger, helper, form // append the list html += "
"; diff --git a/package.json b/package.json index cddd06a..656ecd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "karma-code-reporter", - "version": "0.1.0", + "version": "0.1.1", "description": "A Karma failed test examples creator module/plugin", "main": "index.js", "homepage": "https://github.com/tpaksu/karma-code-reporter",