@@ -34,23 +34,29 @@ describe('setup', function() {
34
34
expect ( flow . opts . simultaneousUploads ) . toBe ( flow . defaults . simultaneousUploads ) ;
35
35
} ) ;
36
36
37
- it ( 'test methods' , function ( ) {
38
- expect ( flow . getFromUniqueIdentifier ( '' ) ) . toBe ( false ) ;
37
+ it ( 'should show methods initial state' , function ( ) {
38
+ expect ( flow . uploadNextChunk ( ) ) . toBe ( false ) ;
39
+
39
40
expect ( flow . progress ( ) ) . toBe ( 0 ) ;
40
41
expect ( flow . isUploading ( ) ) . toBe ( false ) ;
41
- expect ( flow . uploadNextChunk ( ) ) . toBe ( false ) ;
42
42
expect ( flow . timeRemaining ( ) ) . toBe ( 0 ) ;
43
43
expect ( flow . sizeUploaded ( ) ) . toBe ( 0 ) ;
44
44
} ) ;
45
45
46
- it ( 'test getSize ' , function ( ) {
46
+ it ( 'should return total files size ' , function ( ) {
47
47
expect ( flow . getSize ( ) ) . toBe ( 0 ) ;
48
48
flow . addFile ( new Blob ( [ '1234' ] ) ) ;
49
49
expect ( flow . getSize ( ) ) . toBe ( 4 ) ;
50
50
flow . addFile ( new Blob ( [ '123' ] ) ) ;
51
51
expect ( flow . getSize ( ) ) . toBe ( 7 ) ;
52
52
} ) ;
53
53
54
+ it ( 'should find file by identifier' , function ( ) {
55
+ expect ( flow . getFromUniqueIdentifier ( '' ) ) . toBe ( false ) ;
56
+ flow . addFile ( new Blob ( [ '1234' ] ) ) ;
57
+ expect ( flow . getFromUniqueIdentifier ( 4 ) ) . toBe ( flow . files [ 0 ] ) ;
58
+ } ) ;
59
+
54
60
describe ( 'assignBrowse' , function ( ) {
55
61
it ( 'assign to input' , function ( ) {
56
62
var input = document . createElement ( 'input' ) ;
0 commit comments