From 708043dd6b735e86b3887d63341e58ed575f65b4 Mon Sep 17 00:00:00 2001 From: Nicholas Palenchar Date: Fri, 24 Jan 2020 12:18:55 -0500 Subject: [PATCH] very basic testing implementation --- functions/postwomanTesting.js | 8 ++++---- pages/index.vue | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/postwomanTesting.js b/functions/postwomanTesting.js index f0b1ed688..69804cedc 100644 --- a/functions/postwomanTesting.js +++ b/functions/postwomanTesting.js @@ -32,15 +32,15 @@ export default function runTestScriptWitVariables(script, variables) { let errors = null; new Function("pw", script)(pw); // - const report = pw._report.map(item => { - if (item.status) { - item.styles = styles[status]; + const testReports = pw._testReports.map(item => { + if (item.result) { + item.styles = styles[item.result]; } else { item.styles = styles.none; } return item; }); - return {report, errors: pw._errors, testResults: pw._testReports}; + return {report: pw._report, errors: pw._errors, testResults: testReports}; } function test(descriptor, func, _testReports) { diff --git a/pages/index.vue b/pages/index.vue index 1e3d1a123..01e00c13c 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -283,7 +283,7 @@ >