From 52305e8f2d1253cba4d4ee3756c690c54488426e Mon Sep 17 00:00:00 2001 From: Jan Schmidle Date: Sat, 13 Jun 2020 15:43:29 +0200 Subject: [PATCH] chore(istanbul-reports): make tests platform aware --- .../test/fixtures/specs/different-path-files.json | 6 +++--- packages/istanbul-reports/test/html-spa/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/istanbul-reports/test/fixtures/specs/different-path-files.json b/packages/istanbul-reports/test/fixtures/specs/different-path-files.json index e6b34c6b..a7ab398d 100644 --- a/packages/istanbul-reports/test/fixtures/specs/different-path-files.json +++ b/packages/istanbul-reports/test/fixtures/specs/different-path-files.json @@ -6,9 +6,9 @@ }, "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", + ["package1","package1file.js.html"], + ["package1","subpackage","subpackagefile.js.html"], + ["package2","package2file.js.html"], "rootfile.js.html", "index.html" ], 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(