@@ -63,19 +63,19 @@ describe('ParseFile', () => {
63
63
it ( 'can create files with base64 encoding (no padding)' , ( ) => {
64
64
const file = new ParseFile ( 'parse.txt' , { base64 : 'YWJj' } ) ;
65
65
expect ( file . _source . base64 ) . toBe ( 'YWJj' ) ;
66
- expect ( file . _source . type ) . toBe ( '' ) ;
66
+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
67
67
} ) ;
68
68
69
69
it ( 'can create files with base64 encoding (1 padding)' , ( ) => {
70
70
const file = new ParseFile ( 'parse.txt' , { base64 : 'YWI=' } ) ;
71
71
expect ( file . _source . base64 ) . toBe ( 'YWI=' ) ;
72
- expect ( file . _source . type ) . toBe ( '' ) ;
72
+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
73
73
} ) ;
74
74
75
75
it ( 'can create files with base64 encoding (2 padding)' , ( ) => {
76
76
const file = new ParseFile ( 'parse.txt' , { base64 : 'ParseA==' } ) ;
77
77
expect ( file . _source . base64 ) . toBe ( 'ParseA==' ) ;
78
- expect ( file . _source . type ) . toBe ( '' ) ;
78
+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
79
79
} ) ;
80
80
81
81
it ( 'can set the default type to be text/plain when using base64' , ( ) => {
@@ -164,12 +164,6 @@ describe('ParseFile', () => {
164
164
expect ( function ( ) {
165
165
new ParseFile ( 'parse.txt' , 'string' ) ;
166
166
} ) . toThrow ( 'Cannot create a Parse.File with that data.' ) ;
167
-
168
- expect ( function ( ) {
169
- new ParseFile ( 'parse.txt' , {
170
- base64 : 'abc' ,
171
- } ) ;
172
- } ) . toThrow ( 'Cannot create a Parse.File without valid data URIs or base64 encoded data.' ) ;
173
167
} ) ;
174
168
175
169
it ( 'throws with invalid base64' , ( ) => {
0 commit comments