Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-30 13:41:04 +0400
committerVincent Petry <pvince81@owncloud.com>2014-01-30 16:40:01 +0400
commitd36a2ff9eeedc9ebb2ebbba5d55cc255281e9929 (patch)
treeb54a03363f008fa6eac6f8fc0552d6c9482d4667 /apps/files/tests
parent299a8285bd2601ccbac988b2e3e9b067d47921a2 (diff)
Added .jshintrc
- Also fixes a few JSHint warnings in files app - Added "global" comment on top of files app to suppress warning and also inform devs about what globals are use
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/fileactionsSpec.js3
-rw-r--r--apps/files/tests/js/filelistSpec.js2
-rw-r--r--apps/files/tests/js/filesSpec.js7
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js
index 23f7b58dcd9..2db0bb3bbc0 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..510b4df0046 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,6 @@ describe('Files tests', function() {
var threwException = false;
try {
Files.isFileNameValid(fileNames[i]);
- fail();
}
catch (e) {
threwException = true;