@@ -273,7 +273,7 @@ if (buffer.Blob) {
273
273
}
274
274
275
275
test ( 'File is a instance of blob' , t => {
276
- t . is ( new File ( [ ] , '' ) instanceof Blob , true ) ;
276
+ t . true ( new File ( [ ] , '' ) instanceof Blob ) ;
277
277
} ) ;
278
278
279
279
test ( 'fileFrom returns the name' , async t => {
@@ -302,7 +302,7 @@ test('fileFrom(path, type) read/sets the lastModified ', async t => {
302
302
// Earlier test updates the last modified date to now
303
303
t . is ( typeof file . lastModified , 'number' ) ;
304
304
// The lastModifiedDate is deprecated and removed from spec
305
- t . is ( 'lastModifiedDate' in file , false ) ;
305
+ t . false ( 'lastModifiedDate' in file ) ;
306
306
t . is ( file . lastModified > Date . now ( ) - 60000 , true ) ;
307
307
} ) ;
308
308
@@ -317,9 +317,8 @@ test('blobFrom(path) sets empty type', async t => {
317
317
} ) ;
318
318
319
319
test ( 'new File() throws with too few args' , t => {
320
- try {
321
- const file = new File ( ) ; // eslint-disable-line no-unused-vars
322
- } catch ( error ) {
323
- t . is ( error . constructor . name , 'TypeError' ) ;
324
- }
320
+ t . throws ( ( ) => new File ( ) , {
321
+ instanceOf : TypeError ,
322
+ message : 'Failed to construct \'File\': 2 arguments required.'
323
+ } ) ;
325
324
} ) ;
0 commit comments