@@ -171,32 +171,56 @@ describe("isValidVideo", () => {
171171 expect ( result1 ) . toBe ( false ) ;
172172 } ) ;
173173
174- test ( ' validateMp4 should return true for specific byte sequence' , ( ) => {
174+ test ( " validateMp4 should return true for specific byte sequence" , ( ) => {
175175 const fileBuffer = Buffer . from ( [
176- 0x00 , 0x00 , 0x00 , 0x18 , // First 4 bytes
177- 0x66 , 0x74 , 0x79 , 0x70 // Next 4 bytes
176+ 0x00 ,
177+ 0x00 ,
178+ 0x00 ,
179+ 0x18 , // First 4 bytes
180+ 0x66 ,
181+ 0x74 ,
182+ 0x79 ,
183+ 0x70 , // Next 4 bytes
178184 ] ) ;
179185
180186 const result = isValidVideo ( fileBuffer ) ;
181187 expect ( result ) . toBe ( true ) ;
182188 } ) ;
183189
184- test ( ' validateMp4 should return true for byte sequence 1' , ( ) => {
190+ test ( " validateMp4 should return true for byte sequence 1" , ( ) => {
185191 const fileBuffer = Buffer . from ( [
186- 0x00 , 0x00 , 0x00 , 0x20 , // First 4 bytes
187- 0x66 , 0x74 , 0x79 , 0x70 , // Next 4 bytes
188- 0x6d , 0x70 , 0x34 , 0x32 // Last 4 bytes
192+ 0x00 ,
193+ 0x00 ,
194+ 0x00 ,
195+ 0x20 , // First 4 bytes
196+ 0x66 ,
197+ 0x74 ,
198+ 0x79 ,
199+ 0x70 , // Next 4 bytes
200+ 0x6d ,
201+ 0x70 ,
202+ 0x34 ,
203+ 0x32 , // Last 4 bytes
189204 ] ) ;
190205
191206 const result = isValidVideo ( fileBuffer ) ;
192207 expect ( result ) . toBe ( true ) ;
193208 } ) ;
194209
195- test ( ' validateMp4 should return true for byte sequence 2' , ( ) => {
210+ test ( " validateMp4 should return true for byte sequence 2" , ( ) => {
196211 const fileBuffer = Buffer . from ( [
197- 0x00 , 0x00 , 0x00 , 0x1c , // First 4 bytes
198- 0x66 , 0x74 , 0x79 , 0x70 , // Next 4 bytes
199- 0x69 , 0x73 , 0x6f , 0x6d // Last 4 bytes
212+ 0x00 ,
213+ 0x00 ,
214+ 0x00 ,
215+ 0x1c , // First 4 bytes
216+ 0x66 ,
217+ 0x74 ,
218+ 0x79 ,
219+ 0x70 , // Next 4 bytes
220+ 0x69 ,
221+ 0x73 ,
222+ 0x6f ,
223+ 0x6d , // Last 4 bytes
200224 ] ) ;
201225
202226 const result = isValidVideo ( fileBuffer ) ;
0 commit comments