@@ -24,7 +24,7 @@ const mockAdapter = {
2424
2525// Small additional tests to improve overall coverage
2626describe ( 'FilesController' , ( ) => {
27- it ( 'should properly expand objects' , ( done ) => {
27+ it ( 'should properly expand objects' , done => {
2828 const config = Config . get ( Parse . applicationId ) ;
2929 const gridStoreAdapter = new GridFSBucketAdapter (
3030 'mongodb://localhost:27017/parse'
@@ -48,7 +48,7 @@ describe('FilesController', () => {
4848 done ( ) ;
4949 } ) ;
5050
51- it ( 'should create a server log on failure' , ( done ) => {
51+ it ( 'should create a server log on failure' , done => {
5252 const logController = new LoggerController ( new WinstonLoggerAdapter ( ) ) ;
5353
5454 reconfigureServer ( { filesAdapter : mockAdapter } )
@@ -57,28 +57,28 @@ describe('FilesController', () => {
5757 ( ) => done . fail ( 'should not succeed' ) ,
5858 ( ) => setImmediate ( ( ) => Promise . resolve ( 'done' ) )
5959 )
60- . then ( ( ) => new Promise ( ( resolve ) => setTimeout ( resolve , 200 ) ) )
60+ . then ( ( ) => new Promise ( resolve => setTimeout ( resolve , 200 ) ) )
6161 . then ( ( ) =>
6262 logController . getLogs ( { from : Date . now ( ) - 1000 , size : 1000 } )
6363 )
64- . then ( ( logs ) => {
64+ . then ( logs => {
6565 // we get two logs here: 1. the source of the failure to save the file
6666 // and 2 the message that will be sent back to the client.
6767
6868 const log1 = logs . find (
69- ( x ) => x . message === 'Error creating a file: it failed with xyz'
69+ x => x . message === 'Error creating a file: it failed with xyz'
7070 ) ;
7171 expect ( log1 . level ) . toBe ( 'error' ) ;
7272
73- const log2 = logs . find ( ( x ) => x . message === 'it failed with xyz' ) ;
73+ const log2 = logs . find ( x => x . message === 'it failed with xyz' ) ;
7474 expect ( log2 . level ) . toBe ( 'error' ) ;
7575 expect ( log2 . code ) . toBe ( 130 ) ;
7676
7777 done ( ) ;
7878 } ) ;
7979 } ) ;
8080
81- it ( 'should create a parse error when a string is returned' , ( done ) => {
81+ it ( 'should create a parse error when a string is returned' , done => {
8282 const mock2 = mockAdapter ;
8383 mock2 . validateFilename = ( ) => {
8484 return 'Bad file! No biscuit!' ;
@@ -91,7 +91,7 @@ describe('FilesController', () => {
9191 done ( ) ;
9292 } ) ;
9393
94- it ( 'should add a unique hash to the file name when the preserveFileName option is false' , ( done ) => {
94+ it ( 'should add a unique hash to the file name when the preserveFileName option is false' , done => {
9595 const config = Config . get ( Parse . applicationId ) ;
9696 const gridStoreAdapter = new GridFSBucketAdapter (
9797 'mongodb://localhost:27017/parse'
@@ -114,7 +114,7 @@ describe('FilesController', () => {
114114 done ( ) ;
115115 } ) ;
116116
117- it ( 'should not add a unique hash to the file name when the preserveFileName option is true' , ( done ) => {
117+ it ( 'should not add a unique hash to the file name when the preserveFileName option is true' , done => {
118118 const config = Config . get ( Parse . applicationId ) ;
119119 const gridStoreAdapter = new GridFSBucketAdapter (
120120 'mongodb://localhost:27017/parse'
@@ -145,7 +145,7 @@ describe('FilesController', () => {
145145 expect ( result ) . toEqual ( { } ) ;
146146 } ) ;
147147
148- it ( 'should reject slashes in file names' , ( done ) => {
148+ it ( 'should reject slashes in file names' , done => {
149149 const gridStoreAdapter = new GridFSBucketAdapter (
150150 'mongodb://localhost:27017/parse'
151151 ) ;
@@ -154,7 +154,7 @@ describe('FilesController', () => {
154154 done ( ) ;
155155 } ) ;
156156
157- it ( 'should also reject slashes in file names' , ( done ) => {
157+ it ( 'should also reject slashes in file names' , done => {
158158 const gridStoreAdapter = new GridStoreAdapter (
159159 'mongodb://localhost:27017/parse'
160160 ) ;
0 commit comments