Skip to content

Commit 364d72c

Browse files
committed
Combined multiple var declarations in tests.
Makes linter happier. Part of issue #4.
1 parent 9381e39 commit 364d72c

File tree

1 file changed

+37
-38
lines changed

1 file changed

+37
-38
lines changed

test/tests.js

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -64,37 +64,37 @@ $(function() {
6464
test('queue callbacks fire', function() {
6565
expect(13);
6666

67-
var lastFile = null;
68-
var form = $('<form></form>').xhrUploadQueue({
69-
acceptedMimeTypes: [ 'text/plain' ],
70-
init: function() {
71-
ok(this instanceof Object, 'init callback fired with context');
72-
},
73-
queueAdd: function(file) {
74-
ok(this instanceof Object, 'queueAdd callback fired with context');
75-
equal(file.name, 'test.txt', 'file name is correct');
76-
lastFile = file;
77-
},
78-
queueChange: function() {
79-
ok(this instanceof Object, 'queueChange callback fired with context');
80-
},
81-
queueRemove: function() {
82-
ok(this instanceof Object, 'queueRemove callback fired with context');
83-
},
84-
handleUnacceptedFiles: function() {
85-
ok(this instanceof Object, 'handleUnacceptedFiles callback fired with context');
86-
},
87-
uploadStart: function() {
88-
},
89-
uploadFinish: function() {
90-
},
91-
noSupport: function() {
92-
},
93-
processFileList: function(files) {
94-
ok(this instanceof Object, 'processFileList callback fired with context');
95-
return files;
96-
}
97-
});
67+
var lastFile = null,
68+
form = $('<form></form>').xhrUploadQueue({
69+
acceptedMimeTypes: [ 'text/plain' ],
70+
init: function() {
71+
ok(this instanceof Object, 'init callback fired with context');
72+
},
73+
queueAdd: function(file) {
74+
ok(this instanceof Object, 'queueAdd callback fired with context');
75+
equal(file.name, 'test.txt', 'file name is correct');
76+
lastFile = file;
77+
},
78+
queueChange: function() {
79+
ok(this instanceof Object, 'queueChange callback fired with context');
80+
},
81+
queueRemove: function() {
82+
ok(this instanceof Object, 'queueRemove callback fired with context');
83+
},
84+
handleUnacceptedFiles: function() {
85+
ok(this instanceof Object, 'handleUnacceptedFiles callback fired with context');
86+
},
87+
uploadStart: function() {
88+
},
89+
uploadFinish: function() {
90+
},
91+
noSupport: function() {
92+
},
93+
processFileList: function(files) {
94+
ok(this instanceof Object, 'processFileList callback fired with context');
95+
return files;
96+
}
97+
});
9898

9999
form.trigger($.Event('drop', { originalEvent: { dataTransfer: { files: [ new MockFile(100, 'test.txt', 'text/plain') ] } } }));
100100
form.trigger($.Event('drop', { originalEvent: { dataTransfer: { files: [ new MockFile(100, 'test.txt', 'text/plain') ] } } }));
@@ -121,13 +121,12 @@ $(function() {
121121
});
122122

123123
test('hook form submit event', function() {
124-
var uploadStart = false;
125-
126-
var form = $('<form></form>').xhrUploadQueue({
127-
uploadStart: function() {
128-
uploadStart = true;
129-
}
130-
});
124+
var uploadStart = false,
125+
form = $('<form></form>').xhrUploadQueue({
126+
uploadStart: function() {
127+
uploadStart = true;
128+
}
129+
});
131130

132131
form.trigger('submit');
133132
ok(uploadStart, 'form submitted');

0 commit comments

Comments
 (0)