@@ -206,23 +206,24 @@ describe('Parse.File testing', () => {
206206 notEqual ( file . name ( ) , 'hello.txt' ) ;
207207 } ) ;
208208
209- it ( 'save file with tags' , async ( ) => {
209+ it ( 'saves the file with tags' , async ( ) => {
210210 spyOn ( FilesController . prototype , 'createFile' ) . and . callThrough ( ) ;
211211 const file = new Parse . File ( 'hello.txt' , data , 'text/plain' ) ;
212- file . setTags ( { hello : 'world' } ) ;
213- ok ( ! file . url ( ) ) ;
212+ const tags = { hello : 'world' } ;
213+ file . setTags ( tags ) ;
214+ expect ( file . url ( ) ) . toBeUndefined ( ) ;
214215 const result = await file . save ( ) ;
215- equal ( result . tags ( ) , { hello : 'world' } ) ;
216+ expect ( result . tags ( ) ) . toEqual ( tags ) ;
216217 expect ( FilesController . prototype . createFile . calls . argsFor ( 0 ) [ 4 ] ) . toEqual ( {
217- tags : { hello : 'world' } ,
218+ tags : tags ,
218219 metadata : { } ,
219220 } ) ;
220221 } ) ;
221222
222- it ( 'empty file tags should not be passed while saving' , async ( ) => {
223+ it ( 'does not pass empty file tags while saving' , async ( ) => {
223224 spyOn ( FilesController . prototype , 'createFile' ) . and . callThrough ( ) ;
224225 const file = new Parse . File ( 'hello.txt' , data , 'text/plain' ) ;
225- ok ( ! file . url ( ) ) ;
226+ expect ( file . url ( ) ) . toBeUndefined ( ) ;
226227 await file . save ( ) ;
227228 expect ( FilesController . prototype . createFile . calls . argsFor ( 0 ) [ 4 ] ) . toEqual ( {
228229 metadata : { } ,
0 commit comments