diff --git a/test/Examples.spec.js b/test/Examples.spec.js index 5a0d839..dcc7e41 100644 --- a/test/Examples.spec.js +++ b/test/Examples.spec.js @@ -54,7 +54,9 @@ afterAll(async () => { const build = await capturesBuild; console.log( - logReport(dev) + '\n' + 'Examples ran against previous release and current version\n\n' + + logReport(build, `release`) + '\n' + + logReport(dev, `current`) + '\n' + comparisonReport(dev, build, MatterBuild.version, saveComparison) ); }); diff --git a/test/TestTools.js b/test/TestTools.js index 3ef9578..129d70b 100644 --- a/test/TestTools.js +++ b/test/TestTools.js @@ -202,7 +202,7 @@ const equals = (a, b) => { return true; }; -const logReport = captures => { +const logReport = (captures, version) => { let report = ''; for (const capture of Object.values(captures)) { @@ -217,8 +217,8 @@ const logReport = captures => { } } - return report ? `Output logs on last run\n\n${report}` - : 'Output logs on last run\n\n None\n'; + return `Output logs from ${color(version, colors.Yellow)} version on last run\n\n` + + (report ? report : ' None\n'); }; const comparisonReport = (capturesDev, capturesBuild, buildVersion, save) => { @@ -271,7 +271,7 @@ const comparisonReport = (capturesDev, capturesBuild, buildVersion, save) => { const report = (breakEvery, format) => [ [`Output comparison of ${similarityEntries.length}`, - `examples against ${format('matter-js@' + buildVersion, colors.Yellow)} build on last run` + `examples against previous release ${format('matter-js@' + buildVersion, colors.Yellow)}` ].join(' '), `\n\n${format('Similarity', colors.White)}`, `${format(toPercent(similarityAvg), similarityAvg === 1 ? colors.Green : colors.Yellow)}%`,