]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: New formatter byte unit tests 21614/head
authorStephan Müller <smueller@suse.com>
Mon, 24 Sep 2018 13:36:15 +0000 (15:36 +0200)
committerStephan Müller <smueller@suse.com>
Tue, 9 Oct 2018 14:13:48 +0000 (16:13 +0200)
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.spec.ts

index f75e8389b256e0e49952a777cad8f51f9d4532cf..5da62ddc19e1685eddd235a69991a0ce811cdc1d 100644 (file)
@@ -63,6 +63,10 @@ describe('FormatterService', () => {
       expect(service.toBytes('1.1  kib')).toBeNull();
       expect(service.toBytes('1.kib')).toBeNull();
       expect(service.toBytes('1 ki')).toBeNull();
+      expect(service.toBytes()).toBeNull();
+      expect(service.toBytes('')).toBeNull();
+      expect(service.toBytes('-')).toBeNull();
+      expect(service.toBytes(null)).toBeNull();
     });
 
     it('should convert values to bytes', () => {