From 39a8f6e33fd9a06b2405605b9d2f287dcceeb5a2 Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Wed, 22 May 2024 12:21:23 +0530 Subject: [PATCH] Testing JSON parse --- src/buildSummary.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/buildSummary.ts b/src/buildSummary.ts index 5a278e6..3a1508f 100644 --- a/src/buildSummary.ts +++ b/src/buildSummary.ts @@ -29,22 +29,23 @@ export async function readJsonFile(filePath: string): Promise { } export function addBuildSummaryTable(tasks: TaskList): void { +const header: string[] = ['Task Name', 'Description', 'status', 'skipped', 'duration']; console.log("Task Details:"); let arrayOfStringArrays: string[][] = []; +arrayOfStringArrays.push(header); tasks.taskDetails.forEach((task, index) => { let taskDetails: string[] = []; console.log(`Task ${index + 1}:`); taskDetails.push(`${task.name}`); - console.log(`Name: ${task.name}`); + taskDetails.push(`${task.description}`) - console.log(`Description: ${task.description}`); + taskDetails.push(`${task.failed}`); - console.log(`Failed: ${task.failed}`); + taskDetails.push(`${task.skipped}`); - console.log(`Skipped: ${task.skipped}`); + taskDetails.push(`${task.duration}`); - console.log(`Duration: ${task.duration}`); - console.log('---'); + arrayOfStringArrays.push(taskDetails); });