Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 12:18:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 12:18:33 +0300
commit74da249f7e22c20e144ba3c044c6bdeb5df86cd4 (patch)
tree0db7396e87d999b13cc61dff61e4f323e0a4a5d2 /spec/frontend/lib
parente14edb3ce5fd3162d3cf10b88f58333066109f53 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r--spec/frontend/lib/utils/datetime/date_format_utility_spec.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/frontend/lib/utils/datetime/date_format_utility_spec.js b/spec/frontend/lib/utils/datetime/date_format_utility_spec.js
index a83b0ed9fbe..6b515e9f96a 100644
--- a/spec/frontend/lib/utils/datetime/date_format_utility_spec.js
+++ b/spec/frontend/lib/utils/datetime/date_format_utility_spec.js
@@ -136,11 +136,16 @@ describe('formatTimeAsSummary', () => {
describe('durationTimeFormatted', () => {
it.each`
- duration | expectedOutput
- ${87} | ${'00:01:27'}
- ${141} | ${'00:02:21'}
- ${12} | ${'00:00:12'}
- ${60} | ${'00:01:00'}
+ duration | expectedOutput
+ ${0} | ${'00:00:00'}
+ ${12} | ${'00:00:12'}
+ ${60} | ${'00:01:00'}
+ ${60 + 27} | ${'00:01:27'}
+ ${120 + 21} | ${'00:02:21'}
+ ${4 * 60 * 60 + 25 * 60 + 37} | ${'04:25:37'}
+ ${35 * 60 * 60 + 3 * 60 + 7} | ${'35:03:07'}
+ ${-60} | ${'-00:01:00'}
+ ${-(35 * 60 * 60 + 3 * 60 + 7)} | ${'-35:03:07'}
`('returns $expectedOutput when provided $duration', ({ duration, expectedOutput }) => {
expect(utils.durationTimeFormatted(duration)).toBe(expectedOutput);
});