diff --git a/packages/istanbul-reports/lib/cobertura/index.js b/packages/istanbul-reports/lib/cobertura/index.js index 85375d47..e5574faa 100644 --- a/packages/istanbul-reports/lib/cobertura/index.js +++ b/packages/istanbul-reports/lib/cobertura/index.js @@ -11,8 +11,11 @@ class CoberturaReport extends ReportBase { constructor(opts) { super(); + opts = opts || {}; + this.cw = null; this.xml = null; + this.timestamp = opts.timestamp || Date.now().toString(); this.projectRoot = opts.projectRoot || process.cwd(); this.file = opts.file || 'cobertura-coverage.xml'; } @@ -41,7 +44,7 @@ class CoberturaReport extends ReportBase { 'branches-valid': metrics.branches.total, 'branches-covered': metrics.branches.covered, 'branch-rate': metrics.branches.pct / 100.0, - timestamp: Date.now().toString(), + timestamp: this.timestamp, complexity: '0', version: '0.1' }); @@ -52,15 +55,12 @@ class CoberturaReport extends ReportBase { } onSummary(node) { - if (node.isRoot()) { - return; - } const metrics = node.getCoverageSummary(true); if (!metrics) { return; } this.xml.openTag('package', { - name: escape(asJavaPackage(node)), + name: node.isRoot() ? 'main' : escape(asJavaPackage(node)), 'line-rate': metrics.lines.pct / 100.0, 'branch-rate': metrics.branches.pct / 100.0 }); @@ -68,7 +68,8 @@ class CoberturaReport extends ReportBase { } onSummaryEnd(node) { - if (node.isRoot()) { + const metrics = node.getCoverageSummary(true); + if (!metrics) { return; } this.xml.closeTag('classes'); diff --git a/packages/istanbul-reports/test/cobertura/index.js b/packages/istanbul-reports/test/cobertura/index.js new file mode 100644 index 00000000..2a39fe86 --- /dev/null +++ b/packages/istanbul-reports/test/cobertura/index.js @@ -0,0 +1,57 @@ +'use strict'; +/* globals describe, it, beforeEach, before, after */ +const fs = require('fs'); +const path = require('path'); +const isWindows = require('is-windows'); +const FileWriter = require('istanbul-lib-report/lib/file-writer'); +const istanbulLibReport = require('istanbul-lib-report'); +const istanbulLibCoverage = require('istanbul-lib-coverage'); +const CoberturaReport = require('../../lib/cobertura/index'); + +require('chai').should(); + +describe('CoberturaReport', () => { + before(() => { + FileWriter.startCapture(); + }); + after(() => { + FileWriter.stopCapture(); + }); + beforeEach(() => { + FileWriter.resetOutput(); + }); + + function createTest(file) { + const fixture = require(path.resolve( + __dirname, + '../fixtures/specs/' + file + )); + it(fixture.title, function() { + if (isWindows()) { + // appveyor does not render console color. + return this.skip(); + } + const context = istanbulLibReport.createContext({ + dir: './', + coverageMap: istanbulLibCoverage.createCoverageMap(fixture.map) + }); + const tree = context.getTree('pkg'); + const report = new CoberturaReport({ + file: '-', + timestamp: '123456789', + ...fixture.opts + }); + tree.visit(report, context); + const output = FileWriter.getOutput(); + output.should.equal(fixture.coberturaCoverageData); + }); + } + + fs.readdirSync(path.resolve(__dirname, '../fixtures/specs')).forEach( + file => { + if (file.indexOf('.json') !== -1) { + createTest(file); + } + } + ); +}); diff --git a/packages/istanbul-reports/test/fixtures/specs/100-line-100-branch.json b/packages/istanbul-reports/test/fixtures/specs/100-line-100-branch.json index 2cbe41b0..b289394e 100644 --- a/packages/istanbul-reports/test/fixtures/specs/100-line-100-branch.json +++ b/packages/istanbul-reports/test/fixtures/specs/100-line-100-branch.json @@ -1,5 +1,9 @@ { "title": "handles 100% branch and line coverage", + "opts": { + "maxCols": 80, + "projectRoot": "/Users/benjamincoe/oss/" + }, "textReportExpected": "----------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|-------------------\n\u001b[32;1mAll files\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[33;1m \u001b[0m \n\u001b[32;1m index.js\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[33;1m \u001b[0m \n----------|---------|----------|---------|---------|-------------------\n", "htmlSpaFiles": ["index.js.html", "index.html"], "htmlSpaCoverageData": { @@ -81,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /Users/benjamincoe/oss/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/Users/benjamincoe/oss/test-exclude/index.js": { "path": "/Users/benjamincoe/oss/test-exclude/index.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/100-line-missing-branch.json b/packages/istanbul-reports/test/fixtures/specs/100-line-missing-branch.json index e950f26a..c0561a71 100644 --- a/packages/istanbul-reports/test/fixtures/specs/100-line-missing-branch.json +++ b/packages/istanbul-reports/test/fixtures/specs/100-line-missing-branch.json @@ -1,6 +1,10 @@ { "title": "100% line coverage, missing branch coverage", "textReportExpected": "----------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|-------------------\n\u001b[32;1mAll files\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 95.34\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[33;1m \u001b[0m \n\u001b[32;1m index.js\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 95.34\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[33;1m21,29 \u001b[0m \n----------|---------|----------|---------|---------|-------------------\n", + "opts": { + "maxCols": 80, + "projectRoot": "/Users/benjamincoe/oss/" + }, "htmlSpaFiles": ["index.js.html", "index.html"], "htmlSpaCoverageData": { "file": "", @@ -81,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /Users/benjamincoe/oss/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/Users/benjamincoe/oss/test-exclude/index.js": { "path": "/Users/benjamincoe/oss/test-exclude/index.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/coalescence.json b/packages/istanbul-reports/test/fixtures/specs/coalescence.json index 14095de7..34de9692 100644 --- a/packages/istanbul-reports/test/fixtures/specs/coalescence.json +++ b/packages/istanbul-reports/test/fixtures/specs/coalescence.json @@ -1,7 +1,8 @@ { "title": "coalescense ranges of missing lines", "opts": { - "maxCols": 80 + "maxCols": 80, + "projectRoot": "/" }, "textReportExpected": "----------|---------|----------|---------|---------|----------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|----------------------\n\u001b[31;1mAll files\u001b[0m | \u001b[31;1m 30\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[31;1m 33.33\u001b[0m | \u001b[31;1m \u001b[0m \n\u001b[31;1m index.js\u001b[0m | \u001b[31;1m 30\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[31;1m 33.33\u001b[0m | \u001b[31;1m2,4,9,21-28,32,35-37\u001b[0m \n----------|---------|----------|---------|---------|----------------------\n", "htmlSpaFiles": ["index.js.html", "index.html"], @@ -84,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/index.js": { "path": "/index.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/different-path-files.json b/packages/istanbul-reports/test/fixtures/specs/different-path-files.json new file mode 100644 index 00000000..a7ab398d --- /dev/null +++ b/packages/istanbul-reports/test/fixtures/specs/different-path-files.json @@ -0,0 +1,338 @@ +{ + "title": "different path files in seperate packages", + "opts": { + "maxCols": 80, + "projectRoot": "/Users/jschmidle/oss/istanbuljs-test/" + }, + "textReportExpected": "-------------------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n-------------------|---------|----------|---------|---------|-------------------\nAll files | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n istanbuljs-test | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n rootfile.js | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n ...-test/package1 | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n package1file.js | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n ...ge1/subpackage | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n ...ackagefile.js | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n ...-test/package2 | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n package2file.js | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n-------------------|---------|----------|---------|---------|-------------------\n", + "htmlSpaFiles": [ + ["package1","package1file.js.html"], + ["package1","subpackage","subpackagefile.js.html"], + ["package2","package2file.js.html"], + "rootfile.js.html", + "index.html" + ], + "htmlSpaCoverageData": { + "file": "", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": [ + { + "file": "package1", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": [ + { + "file": "package1file.js", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": false + }, + { + "file": "subpackage", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": [ + { + "file": "subpackagefile.js", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": false + } + ] + } + ] + }, + { + "file": "package2", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": [ + { + "file": "package2file.js", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": false + } + ] + }, + { + "file": "rootfile.js", + "isEmpty": true, + "metrics": { + "statements": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "branches": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "functions": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + }, + "lines": { + "total": 0, + "covered": 0, + "skipped": 0, + "pct": 0, + "classForPercent": "empty" + } + }, + "children": false + } + ] + }, + "coberturaCoverageData": "\n\n\n \n /Users/jschmidle/oss/istanbuljs-test/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", + "map": { + "/Users/jschmidle/oss/istanbuljs-test/rootfile.js": { + "path": "/Users/jschmidle/oss/istanbuljs-test/rootfile.js", + "statementMap": {}, + "fnMap": {}, + "branchMap": {}, + "s": {}, + "f": {}, + "b": {} + }, + "/Users/jschmidle/oss/istanbuljs-test/package1/package1file.js": { + "path": "/Users/jschmidle/oss/istanbuljs-test/package1/package1file.js", + "statementMap": {}, + "fnMap": {}, + "branchMap": {}, + "s": {}, + "f": {}, + "b": {} + }, + "/Users/jschmidle/oss/istanbuljs-test/package2/package2file.js": { + "path": "/Users/jschmidle/oss/istanbuljs-test/package2/package2file.js", + "statementMap": {}, + "fnMap": {}, + "branchMap": {}, + "s": {}, + "f": {}, + "b": {} + }, + "/Users/jschmidle/oss/istanbuljs-test/package1/subpackage/subpackagefile.js": { + "path": "/Users/jschmidle/oss/istanbuljs-test/package1/subpackage/subpackagefile.js", + "statementMap": {}, + "fnMap": {}, + "branchMap": {}, + "s": {}, + "f": {}, + "b": {} + } + } +} diff --git a/packages/istanbul-reports/test/fixtures/specs/empty-file-skip-empty.json b/packages/istanbul-reports/test/fixtures/specs/empty-file-skip-empty.json index 42454434..1eb5a9f1 100644 --- a/packages/istanbul-reports/test/fixtures/specs/empty-file-skip-empty.json +++ b/packages/istanbul-reports/test/fixtures/specs/empty-file-skip-empty.json @@ -1,7 +1,9 @@ { "title": "empty file - skip empty", "opts": { - "skipEmpty": true + "skipEmpty": true, + "maxCols": 80, + "projectRoot": "/dev/git/istanbuljs/packages/istanbul-reports" }, "textReportExpected": "----------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|-------------------\n----------|---------|----------|---------|---------|-------------------\n", "htmlSpaFiles": ["empty.js.html", "index.html"], @@ -84,6 +86,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /dev/git/istanbuljs/packages/istanbul-reports\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js": { "path": "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/empty-file.json b/packages/istanbul-reports/test/fixtures/specs/empty-file.json index d092e60c..c6e0eae4 100644 --- a/packages/istanbul-reports/test/fixtures/specs/empty-file.json +++ b/packages/istanbul-reports/test/fixtures/specs/empty-file.json @@ -1,5 +1,9 @@ { "title": "empty file - show 0%", + "opts": { + "maxCols": 80, + "projectRoot": "/dev/git/istanbuljs/packages/istanbul-reports" + }, "textReportExpected": "----------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|-------------------\nAll files | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n empty.js | 0 | 0 | 0 | 0 | \u001b[31;1m \u001b[0m \n----------|---------|----------|---------|---------|-------------------\n", "htmlSpaFiles": ["empty.js.html", "index.html"], "htmlSpaCoverageData": { @@ -81,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /dev/git/istanbuljs/packages/istanbul-reports\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js": { "path": "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/maxcols.json b/packages/istanbul-reports/test/fixtures/specs/maxcols.json index b6e5cc5f..a8d0210a 100644 --- a/packages/istanbul-reports/test/fixtures/specs/maxcols.json +++ b/packages/istanbul-reports/test/fixtures/specs/maxcols.json @@ -1,7 +1,8 @@ { "title": "maxCols - too much uncovered lines", "opts": { - "maxCols": 80 + "maxCols": 80, + "projectRoot": "/" }, "textReportExpected": "----------|---------|----------|---------|---------|----------------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|----------------------------\n\u001b[31;1mAll files\u001b[0m | \u001b[31;1m 40\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[31;1m 40\u001b[0m | \u001b[31;1m \u001b[0m \n\u001b[31;1m index.js\u001b[0m | \u001b[31;1m 40\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[32;1m 100\u001b[0m | \u001b[31;1m 40\u001b[0m | \u001b[31;1m...11,15,19,23,27,31,35,39\u001b[0m \n----------|---------|----------|---------|---------|----------------------------\n", "htmlSpaFiles": ["index.js.html", "index.html"], @@ -84,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/index.js": { "path": "/index.js", diff --git a/packages/istanbul-reports/test/fixtures/specs/missing-line-missing-branch.json b/packages/istanbul-reports/test/fixtures/specs/missing-line-missing-branch.json index f53b2fec..db2e18da 100644 --- a/packages/istanbul-reports/test/fixtures/specs/missing-line-missing-branch.json +++ b/packages/istanbul-reports/test/fixtures/specs/missing-line-missing-branch.json @@ -1,6 +1,10 @@ { "title": "missing line and branch coverage", "textReportExpected": "----------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n----------|---------|----------|---------|---------|-------------------\n\u001b[32;1mAll files\u001b[0m | \u001b[32;1m 98.03\u001b[0m | \u001b[32;1m 95.34\u001b[0m | \u001b[32;1m 88.88\u001b[0m | \u001b[32;1m 97.87\u001b[0m | \u001b[31;1m \u001b[0m \n\u001b[32;1m index.js\u001b[0m | \u001b[32;1m 98.03\u001b[0m | \u001b[32;1m 95.34\u001b[0m | \u001b[32;1m 88.88\u001b[0m | \u001b[32;1m 97.87\u001b[0m | \u001b[31;1m9 \u001b[0m \n----------|---------|----------|---------|---------|-------------------\n", + "opts": { + "maxCols": 80, + "projectRoot": "/Users/benjamincoe/oss" + }, "htmlSpaFiles": ["index.js.html", "index.html"], "htmlSpaCoverageData": { "file": "", @@ -81,6 +85,7 @@ } ] }, + "coberturaCoverageData": "\n\n\n \n /Users/benjamincoe/oss\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "map": { "/Users/benjamincoe/oss/test-exclude/index.js": { "path": "/Users/benjamincoe/oss/test-exclude/index.js", diff --git a/packages/istanbul-reports/test/html-spa/index.js b/packages/istanbul-reports/test/html-spa/index.js index ca767c8c..a227f7ea 100644 --- a/packages/istanbul-reports/test/html-spa/index.js +++ b/packages/istanbul-reports/test/html-spa/index.js @@ -161,7 +161,7 @@ describe('html-spa', () => { operations .filter(op => op.type === 'write') .map(op => path.join(op.baseDir, op.file)), - fixture.htmlSpaFiles + fixture.htmlSpaFiles.map(p => path.join(...[].concat(p))) ); assert.deepEqual(