@@ -63,19 +63,19 @@ describe('ParseFile', () => {
6363 it ( 'can create files with base64 encoding (no padding)' , ( ) => {
6464 const file = new ParseFile ( 'parse.txt' , { base64 : 'YWJj' } ) ;
6565 expect ( file . _source . base64 ) . toBe ( 'YWJj' ) ;
66- expect ( file . _source . type ) . toBe ( '' ) ;
66+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
6767 } ) ;
6868
6969 it ( 'can create files with base64 encoding (1 padding)' , ( ) => {
7070 const file = new ParseFile ( 'parse.txt' , { base64 : 'YWI=' } ) ;
7171 expect ( file . _source . base64 ) . toBe ( 'YWI=' ) ;
72- expect ( file . _source . type ) . toBe ( '' ) ;
72+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
7373 } ) ;
7474
7575 it ( 'can create files with base64 encoding (2 padding)' , ( ) => {
7676 const file = new ParseFile ( 'parse.txt' , { base64 : 'ParseA==' } ) ;
7777 expect ( file . _source . base64 ) . toBe ( 'ParseA==' ) ;
78- expect ( file . _source . type ) . toBe ( '' ) ;
78+ expect ( file . _source . type ) . toBe ( 'text/plain ' ) ;
7979 } ) ;
8080
8181 it ( 'can set the default type to be text/plain when using base64' , ( ) => {
@@ -164,12 +164,6 @@ describe('ParseFile', () => {
164164 expect ( function ( ) {
165165 new ParseFile ( 'parse.txt' , 'string' ) ;
166166 } ) . 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.' ) ;
173167 } ) ;
174168
175169 it ( 'throws with invalid base64' , ( ) => {
0 commit comments