Skip to content

Commit

Permalink
Testing JSON parse
Browse files Browse the repository at this point in the history
  • Loading branch information
nbhoski committed May 22, 2024
1 parent 2d220bc commit 39a8f6e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/buildSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@ export async function readJsonFile(filePath: string): Promise<TaskList> {
}

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);
});

Expand Down

0 comments on commit 39a8f6e

Please sign in to comment.