Skip to content

Commit

Permalink
Fixed #44
Browse files Browse the repository at this point in the history
  • Loading branch information
nbhoski committed Jul 22, 2024
1 parent 9c40bb4 commit b8802d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/buildSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface Task {


export function getBuildSummaryTable(tasks: Task[]): string[][] {
const header: string[] = ['MATLAB Build Task', 'Status', 'Description', 'Duration (HH:MM:SS)'];
const header: string[] = ['MATLAB Build Task', 'Status', 'Description', 'Duration (hh:mm:ss)'];
let taskSummaryTableRows: string[][] = [header];

if(!Array.isArray(tasks)){
Expand Down Expand Up @@ -68,11 +68,11 @@ export function getTaskDetails(tasks: Task): string[] {
let taskDetails: string[] = [];
taskDetails.push(tasks.name);
if (tasks.failed) {
taskDetails.push('πŸ”΄ FAILED');
taskDetails.push('πŸ”΄ Failed');
} else if (tasks.skipped) {
taskDetails.push('πŸ”΅ SKIPPED');
taskDetails.push('πŸ”΅ Skipped');
} else {
taskDetails.push('🟒 SUCCESS');
taskDetails.push('🟒 Success');
}
taskDetails.push(tasks.description);
taskDetails.push(tasks.duration);
Expand Down
4 changes: 2 additions & 2 deletions src/buildSummary.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('summaryGeneration', () => {

const expectedTable = [
['MATLAB Build Task', 'Status', 'Description', 'Duration (HH:MM:SS)'],
['Test Task', 'πŸ”΄ FAILED', 'A test task', '00:00:10'],
['Test Task', 'πŸ”΄ Failed', 'A test task', '00:00:10'],
];

const table = buildSummary.getBuildSummaryTable(mockTasks);
Expand All @@ -30,7 +30,7 @@ describe('summaryGeneration', () => {
it('writes the summary correctly', () => {
const mockTableRows = [
['MATLAB Build Task', 'Status', 'Description', 'Duration (HH:MM:SS)'],
['Test Task', 'πŸ”΄ FAILED', 'A test task', '00:00:10'],
['Test Task', 'πŸ”΄ Failed', 'A test task', '00:00:10'],
];

buildSummary.writeSummary(mockTableRows);
Expand Down

0 comments on commit b8802d0

Please sign in to comment.