refactor: use optional catch binding (#39232)
This commit is contained in:
parent
8dea783805
commit
c9bae5da8e
11 changed files with 17 additions and 17 deletions
|
@ -104,7 +104,7 @@ describe('protocol module', () => {
|
|||
try {
|
||||
callback(text);
|
||||
callback('');
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
});
|
||||
|
@ -557,7 +557,7 @@ describe('protocol module', () => {
|
|||
try {
|
||||
callback(text);
|
||||
callback('');
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
});
|
||||
|
@ -1106,7 +1106,7 @@ describe('protocol module', () => {
|
|||
// In case of failure, make sure we unhandle. But we should succeed
|
||||
// :)
|
||||
protocol.unhandle('test-scheme');
|
||||
} catch (_ignored) { /* ignore */ }
|
||||
} catch { /* ignore */ }
|
||||
});
|
||||
const resp1 = await net.fetch('test-scheme://foo');
|
||||
expect(resp1.status).to.equal(200);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue