diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-04 12:11:32 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-04 12:11:32 -0800 |
commit | 6d3b61f3884d6cf7b2eb68cdd60c713620afabbd (patch) | |
tree | 7051ae377055969aeeed9f4490e8478afaad0b5d /apps/files/tests | |
parent | 0609f30d1c4ab01804d0ecf943c0d9146bb41cb7 (diff) | |
parent | ba1b9df8a9c2da0f46f2b5a587eeb92c8c3d528d (diff) | |
download | nextcloud-server-6d3b61f3884d6cf7b2eb68cdd60c713620afabbd.tar.gz nextcloud-server-6d3b61f3884d6cf7b2eb68cdd60c713620afabbd.zip |
Merge pull request #7011 from owncloud/jshint
Added .jshintrc
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/fileactionsSpec.js | 3 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 2 | ||||
-rw-r--r-- | apps/files/tests/js/filesSpec.js | 8 |
3 files changed, 11 insertions, 2 deletions
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js index e185cf2f654..8bbc1d3d141 100644 --- a/apps/files/tests/js/fileactionsSpec.js +++ b/apps/files/tests/js/fileactionsSpec.js @@ -18,7 +18,10 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ + +/* global OC, FileActions, FileList */ describe('FileActions tests', function() { + var $filesTable; beforeEach(function() { // init horrible parameters var $body = $('body'); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 61e026c0725..c26e65fc4de 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -18,6 +18,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ + +/* global OC, FileList */ describe('FileList tests', function() { beforeEach(function() { // init horrible parameters diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js index 9d0a2e4f9d7..018c8ef0f3c 100644 --- a/apps/files/tests/js/filesSpec.js +++ b/apps/files/tests/js/filesSpec.js @@ -18,6 +18,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ + +/* global Files */ describe('Files tests', function() { describe('File name validation', function() { it('Validates correct file names', function() { @@ -36,12 +38,14 @@ describe('Files tests', function() { 'und Ümläüte sind auch willkommen' ]; for ( var i = 0; i < fileNames.length; i++ ) { + var error = false; try { expect(Files.isFileNameValid(fileNames[i])).toEqual(true); } catch (e) { - fail(); + error = e; } + expect(error).toEqual(false); } }); it('Detects invalid file names', function() { @@ -69,7 +73,7 @@ describe('Files tests', function() { var threwException = false; try { Files.isFileNameValid(fileNames[i]); - fail(); + console.error('Invalid file name not detected:', fileNames[i]); } catch (e) { threwException = true; |