File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ test('Reading after modified should fail', async t => {
165
165
const now = new Date ( ) ;
166
166
// Change modified time
167
167
fs . utimesSync ( './LICENSE' , now , now ) ;
168
- const error = await blob . text ( ) . catch ( error => error ) ;
168
+ const error = await t . throwsAsync ( blob . text ( ) ) ;
169
169
t . is ( error . constructor . name , 'DOMException' ) ;
170
170
t . is ( error instanceof Error , true ) ;
171
171
t . is ( error . name , 'NotReadableError' ) ;
@@ -179,7 +179,7 @@ test('Reading file after modified should fail', async t => {
179
179
const now = new Date ( ) ;
180
180
// Change modified time
181
181
fs . utimesSync ( './LICENSE' , now , now ) ;
182
- const error = await file . text ( ) . catch ( error => error ) ;
182
+ const error = await t . throwsAsync ( file . text ( ) ) ;
183
183
t . is ( error . constructor . name , 'DOMException' ) ;
184
184
t . is ( error instanceof Error , true ) ;
185
185
t . is ( error . name , 'NotReadableError' ) ;
You can’t perform that action at this time.
0 commit comments