diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2017-05-31 18:14:11 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2017-05-31 18:14:11 +0800 |
| commit | 6c72d8a2199de4adcf7033d4031499d842f4595e (patch) | |
| tree | 30d8dc72ac8efab131c4219390e4d1ee6a95c7b1 /spec/javascripts/lib | |
| parent | b7c3c55dfa4053719a481b09f926df68b57d3468 (diff) | |
| parent | 228926daee799c95e752a3c284c860e5bc60e528 (diff) | |
| download | gitlab-ce-6c72d8a2199de4adcf7033d4031499d842f4595e.tar.gz | |
Merge remote-tracking branch 'upstream/master' into rename-builds-controller
* upstream/master: (116 commits)
Revert "Merge branch 'grpc-1.3.4' into 'master'"
Return nil when looking up config for unknown LDAP provider
Avoid crash when trying to parse string with invalid UTF-8 sequence
Enable Gitaly by default in GitLab 9.3
Don’t create comment on JIRA if link already exists
Disable sub_group_issuables_spec.rb for mysql
Fix math rendering on blob pages
Add changelog
Don't allow to pass a user to ProjectWiki#http_url_to_repo
Revert "Merge branch '1937-https-clone-url-username' into 'master'
"
Fix bottom padding for build page
Fix /unsubscribe slash command creating extra todos
Fix omniauth-google-oauth2 dependencies in Gemfile.lock
Update looks job log
'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled
Fix spec for Members::AuthorizedDestroyService
31616-add-uptime-of-gitlab-instance-in-admin-area
Set head pipeline when creating merge requests
Create a separate helper to check if we show particular tab on a search page
Add performance deltas between app deployments on Merge Request widget
...
Diffstat (limited to 'spec/javascripts/lib')
| -rw-r--r-- | spec/javascripts/lib/utils/number_utility_spec.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/javascripts/lib/utils/number_utility_spec.js b/spec/javascripts/lib/utils/number_utility_spec.js index 90b12c9f115..83c92deccdc 100644 --- a/spec/javascripts/lib/utils/number_utility_spec.js +++ b/spec/javascripts/lib/utils/number_utility_spec.js @@ -1,4 +1,4 @@ -import { formatRelevantDigits, bytesToKiB } from '~/lib/utils/number_utils'; +import { formatRelevantDigits, bytesToKiB, bytesToMiB } from '~/lib/utils/number_utils'; describe('Number Utils', () => { describe('formatRelevantDigits', () => { @@ -45,4 +45,11 @@ describe('Number Utils', () => { expect(bytesToKiB(1000)).toEqual(0.9765625); }); }); + + describe('bytesToMiB', () => { + it('calculates MiB for the given bytes', () => { + expect(bytesToMiB(1048576)).toEqual(1); + expect(bytesToMiB(1000000)).toEqual(0.95367431640625); + }); + }); }); |
