]> source.dussan.org Git - nextcloud-server.git/commitdiff
JS unit tests fix - use toBeUndefined() instead of toEqual(null)
authorMorris Jobke <hey@morrisjobke.de>
Tue, 4 Nov 2014 09:37:16 +0000 (10:37 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 4 Nov 2014 09:37:16 +0000 (10:37 +0100)
apps/files/tests/js/filelistSpec.js

index 83cf1f428b22f3ba6565ac3d3f3b0f3a6936d48b..a7fa14eb14a170b281b242b270369151d553f7c4 100644 (file)
@@ -219,13 +219,13 @@ describe('OCA.Files.FileList tests', function() {
 
                        expect($tr).toBeDefined();
                        expect($tr[0].tagName.toLowerCase()).toEqual('tr');
-                       expect($tr.attr('data-id')).toEqual(null);
+                       expect($tr.attr('data-id')).toBeUndefined();
                        expect($tr.attr('data-type')).toEqual('file');
                        expect($tr.attr('data-file')).toEqual('testFile.txt');
-                       expect($tr.attr('data-size')).toEqual(null);
-                       expect($tr.attr('data-etag')).toEqual(null);
+                       expect($tr.attr('data-size')).toBeUndefined();
+                       expect($tr.attr('data-etag')).toBeUndefined();
                        expect($tr.attr('data-permissions')).toEqual('31');
-                       expect($tr.attr('data-mime')).toEqual(null);
+                       expect($tr.attr('data-mime')).toBeUndefined();
                        expect($tr.attr('data-mtime')).toEqual('123456');
 
                        expect($tr.find('.filesize').text()).toEqual('Pending');
@@ -240,11 +240,11 @@ describe('OCA.Files.FileList tests', function() {
 
                        expect($tr).toBeDefined();
                        expect($tr[0].tagName.toLowerCase()).toEqual('tr');
-                       expect($tr.attr('data-id')).toEqual(null);
+                       expect($tr.attr('data-id')).toBeUndefined();
                        expect($tr.attr('data-type')).toEqual('dir');
                        expect($tr.attr('data-file')).toEqual('testFolder');
-                       expect($tr.attr('data-size')).toEqual(null);
-                       expect($tr.attr('data-etag')).toEqual(null);
+                       expect($tr.attr('data-size')).toBeUndefined();
+                       expect($tr.attr('data-etag')).toBeUndefined();
                        expect($tr.attr('data-permissions')).toEqual('31');
                        expect($tr.attr('data-mime')).toEqual('httpd/unix-directory');
                        expect($tr.attr('data-mtime')).toEqual('123456');