diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-06 09:57:59 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-11-06 09:57:59 +0100 |
commit | d790c27a19494346bc7293bee00026201f2910f0 (patch) | |
tree | c13fb1278dbe28f2ffc3b679daa491a6140d029c /core/js/tests | |
parent | 576d31d48d1e368c0ca54a95f28dc3bc0e553d83 (diff) | |
download | nextcloud-server-d790c27a19494346bc7293bee00026201f2910f0.tar.gz nextcloud-server-d790c27a19494346bc7293bee00026201f2910f0.zip |
Reduce JSHint errors/warnings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/coreSpec.js | 4 | ||||
-rw-r--r-- | core/js/tests/specs/files/clientSpec.js | 2 | ||||
-rw-r--r-- | core/js/tests/specs/jquery.avatarSpec.js | 4 | ||||
-rw-r--r-- | core/js/tests/specs/mimeTypeSpec.js | 10 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialoglinkshareview.js | 1 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogshareelistview.js | 1 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogviewSpec.js | 1 |
7 files changed, 10 insertions, 13 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js index dd13cba8e2b..9848fb46ffc 100644 --- a/core/js/tests/specs/coreSpec.js +++ b/core/js/tests/specs/coreSpec.js @@ -256,10 +256,10 @@ describe('Core base tests', function() { describe('filePath', function() { beforeEach(function() { OC.webroot = 'http://localhost'; - OC.appswebroots['files'] = OC.webroot + '/apps3/files'; + OC.appswebroots.files = OC.webroot + '/apps3/files'; }); afterEach(function() { - delete OC.appswebroots['files']; + delete OC.appswebroots.files; }); it('Uses a direct link for css and images,' , function() { diff --git a/core/js/tests/specs/files/clientSpec.js b/core/js/tests/specs/files/clientSpec.js index f75998029a9..d66c209bca5 100644 --- a/core/js/tests/specs/files/clientSpec.js +++ b/core/js/tests/specs/files/clientSpec.js @@ -448,7 +448,7 @@ describe('OC.Files.Client tests', function() { expect(info.id).toEqual(11); // file entry - var info = response[1]; + info = response[1]; expect(info instanceof OC.Files.FileInfo).toEqual(true); expect(info.id).toEqual(51); diff --git a/core/js/tests/specs/jquery.avatarSpec.js b/core/js/tests/specs/jquery.avatarSpec.js index d7305736690..b9351d2a8a0 100644 --- a/core/js/tests/specs/jquery.avatarSpec.js +++ b/core/js/tests/specs/jquery.avatarSpec.js @@ -11,7 +11,7 @@ describe('jquery.avatar tests', function() { var $div; - var devicePixelRatio + var devicePixelRatio; beforeEach(function() { $('#testArea').append($('<div id="avatardiv">')); @@ -24,7 +24,7 @@ describe('jquery.avatar tests', function() { afterEach(function() { $div.remove(); - window.devicePixelRatio = devicePixelRatio + window.devicePixelRatio = devicePixelRatio; }); describe('size', function() { diff --git a/core/js/tests/specs/mimeTypeSpec.js b/core/js/tests/specs/mimeTypeSpec.js index 182941de1a9..8ad0300a0a7 100644 --- a/core/js/tests/specs/mimeTypeSpec.js +++ b/core/js/tests/specs/mimeTypeSpec.js @@ -26,17 +26,17 @@ describe('MimeType tests', function() { beforeEach(function() { _files = OC.MimeTypeList.files; _aliases = OC.MimeTypeList.aliases; - _theme = OC.MimeTypeList.themes['abc']; + _theme = OC.MimeTypeList.themes.abc; OC.MimeTypeList.files = ['folder', 'folder-shared', 'folder-external', 'foo-bar', 'foo', 'file']; OC.MimeTypeList.aliases = {'app/foobar': 'foo/bar'}; - OC.MimeTypeList.themes['abc'] = ['folder']; + OC.MimeTypeList.themes.abc = ['folder']; }); afterEach(function() { OC.MimeTypeList.files = _files; OC.MimeTypeList.aliases = _aliases; - OC.MimeTypeList.themes['abc'] = _theme; + OC.MimeTypeList.themes.abc = _theme; }); describe('_getFile', function() { @@ -109,9 +109,9 @@ describe('MimeType tests', function() { var res = OC.MimeType.getIconUrl('dir'); expect(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(1); - expect(OC.MimeType._mimeTypeIcons['dir']).toEqual(res); + expect(OC.MimeType._mimeTypeIcons.dir).toEqual(res); - var res = OC.MimeType.getIconUrl('dir-shared'); + res = OC.MimeType.getIconUrl('dir-shared'); expect(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(2); expect(OC.MimeType._mimeTypeIcons['dir-shared']).toEqual(res); }); diff --git a/core/js/tests/specs/sharedialoglinkshareview.js b/core/js/tests/specs/sharedialoglinkshareview.js index 811919b5603..12f5e762cee 100644 --- a/core/js/tests/specs/sharedialoglinkshareview.js +++ b/core/js/tests/specs/sharedialoglinkshareview.js @@ -48,7 +48,6 @@ describe('OC.Share.ShareDialogLinkShareView', function () { configModel = new OC.Share.ShareConfigModel({ enforcePasswordForPublicLink: false, isResharingAllowed: true, - enforcePasswordForPublicLink: false, isDefaultExpireDateEnabled: false, isDefaultExpireDateEnforced: false, defaultExpireDate: 7 diff --git a/core/js/tests/specs/sharedialogshareelistview.js b/core/js/tests/specs/sharedialogshareelistview.js index bcc596a1386..d256abcbffe 100644 --- a/core/js/tests/specs/sharedialogshareelistview.js +++ b/core/js/tests/specs/sharedialogshareelistview.js @@ -59,7 +59,6 @@ describe('OC.Share.ShareDialogShareeListView', function () { configModel = new OC.Share.ShareConfigModel({ enforcePasswordForPublicLink: false, isResharingAllowed: true, - enforcePasswordForPublicLink: false, isDefaultExpireDateEnabled: false, isDefaultExpireDateEnforced: false, defaultExpireDate: 7 diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js index 95349bc4875..c6d5793623c 100644 --- a/core/js/tests/specs/sharedialogviewSpec.js +++ b/core/js/tests/specs/sharedialogviewSpec.js @@ -67,7 +67,6 @@ describe('OC.Share.ShareDialogView', function() { configModel = new OC.Share.ShareConfigModel({ enforcePasswordForPublicLink: false, isResharingAllowed: true, - enforcePasswordForPublicLink: false, isDefaultExpireDateEnabled: false, isDefaultExpireDateEnforced: false, defaultExpireDate: 7 |