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:
authorPhil Hughes <me@iamphill.com>2019-06-06 22:43:18 +0300
committerPhil Hughes <me@iamphill.com>2019-06-06 22:43:18 +0300
commit7d47ec540d3e730a1d98deb37355253720b8c98b (patch)
tree47c559b390307f456df5159f6e527e2d21ce1087 /spec/frontend
parent62b5fa41e592123794e8b9ee222b89db8efb0103 (diff)
parent74f78fa326a603be310375f9b37f8c8c9d921305 (diff)
Merge branch '59232-add-storage-counter-ce' into 'master'
CE backport for Storage Counter changes Closes #59232 See merge request gitlab-org/gitlab-ce!29206
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/lib/utils/number_utility_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/lib/utils/number_utility_spec.js b/spec/frontend/lib/utils/number_utility_spec.js
index 818404bad81..77d7478d317 100644
--- a/spec/frontend/lib/utils/number_utility_spec.js
+++ b/spec/frontend/lib/utils/number_utility_spec.js
@@ -5,6 +5,7 @@ import {
bytesToGiB,
numberToHumanSize,
sum,
+ isOdd,
} from '~/lib/utils/number_utils';
describe('Number Utils', () => {
@@ -98,4 +99,14 @@ describe('Number Utils', () => {
expect([1, 2, 3, 4, 5].reduce(sum)).toEqual(15);
});
});
+
+ describe('isOdd', () => {
+ it('should return 0 with a even number', () => {
+ expect(isOdd(2)).toEqual(0);
+ });
+
+ it('should return 1 with a odd number', () => {
+ expect(isOdd(1)).toEqual(1);
+ });
+ });
});