Skip to content

Commit 415ca22

Browse files
committed
Create test for formatting of snapshot time
1 parent 902600e commit 415ca22

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/__tests__/action.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,12 @@ describe('unit testing for Action.tsx', () => {
5959
expect(screen.getAllByRole('button')[0]).toHaveTextContent('NO TIME');
6060
});
6161
});
62+
63+
describe('When actualDuration exceeds 60', () => {
64+
test('Time should be formatted correctly', () => {
65+
props.componentData.actualDuration = 75;
66+
render(<Action {...props} />);
67+
expect(screen.getAllByRole('button')[0]).toHaveTextContent('+01:15.00');
68+
});
69+
});
6270
});

0 commit comments

Comments
 (0)