Skip to content

Commit 26672df

Browse files
committed
Compare joined arrays for better errors messages.
1 parent f3ad38d commit 26672df

File tree

1 file changed

+34
-30
lines changed

1 file changed

+34
-30
lines changed

test/unit.js

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@
249249
expect(eventsData.dragover).to.equal();
250250
expect(eventsData.dragenter).to.equal();
251251
expect(eventsData.dragleave).to.equal();
252-
expect(eventsData.drop).to.deep.equal();
252+
expect(eventsData.drop).to.equal();
253253
pasteZone.trigger($.Event('paste', eventObject));
254-
expect(eventsData.paste).to.deep.equal();
254+
expect(eventsData.paste).to.equal();
255255
});
256256

257257
it('disable', function() {
@@ -291,11 +291,11 @@
291291
expect(eventsData.dragover).to.equal();
292292
expect(eventsData.dragenter).to.equal();
293293
expect(eventsData.dragleave).to.equal();
294-
expect(eventsData.drop).to.deep.equal();
294+
expect(eventsData.drop).to.equal();
295295
form
296296
.fileupload('option', 'pasteZone')
297297
.trigger($.Event('paste', eventObject));
298-
expect(eventsData.paste).to.deep.equal();
298+
expect(eventsData.paste).to.equal();
299299
});
300300

301301
it('enable', function() {
@@ -787,18 +787,20 @@
787787
stop: function() {
788788
events.push('stop');
789789
if (completed === 4) {
790-
expect(events).to.deep.equal([
791-
'start',
792-
'send',
793-
'complete',
794-
'send',
795-
'complete',
796-
'send',
797-
'complete',
798-
'send',
799-
'complete',
800-
'stop'
801-
]);
790+
expect(events.join(',')).to.equal(
791+
[
792+
'start',
793+
'send',
794+
'complete',
795+
'send',
796+
'complete',
797+
'send',
798+
'complete',
799+
'send',
800+
'complete',
801+
'stop'
802+
].join(',')
803+
);
802804
done();
803805
}
804806
}
@@ -890,20 +892,22 @@
890892
expect(uploadedFile.size).to.equal(fileGIF.size);
891893
},
892894
stop: function() {
893-
expect(events).to.deep.equal([
894-
'chunkbeforesend',
895-
'chunksend',
896-
'chunkdone',
897-
'chunkbeforesend',
898-
'chunksend',
899-
'chunkdone',
900-
'chunkbeforesend',
901-
'chunksend',
902-
'chunkdone',
903-
'chunkbeforesend',
904-
'chunksend',
905-
'chunkdone'
906-
]);
895+
expect(events.join(',')).to.equal(
896+
[
897+
'chunkbeforesend',
898+
'chunksend',
899+
'chunkdone',
900+
'chunkbeforesend',
901+
'chunksend',
902+
'chunkdone',
903+
'chunkbeforesend',
904+
'chunksend',
905+
'chunkdone',
906+
'chunkbeforesend',
907+
'chunksend',
908+
'chunkdone'
909+
].join(',')
910+
);
907911
done();
908912
}
909913
});

0 commit comments

Comments
 (0)