From 7ce0759dbfd8f733b91614f4fb617c187e16d58a Mon Sep 17 00:00:00 2001 From: Timur Shemsedinov Date: Mon, 19 Aug 2024 04:42:02 +0300 Subject: [PATCH] Fix tests due to new eslint warnings --- test/async.js | 4 ++-- test/semaphore.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/async.js b/test/async.js index b2426d13..fe01cced 100644 --- a/test/async.js +++ b/test/async.js @@ -36,7 +36,7 @@ metatests.test('Async: Abortable delay', async (test) => { try { const res = await delay(10); test.strictSame(res, undefined); - } catch (err) { + } catch { test.error(new Error('Should not be executed')); } const ac = new AbortController(); @@ -66,7 +66,7 @@ metatests.test('Async: timeoutify', async (test) => { const response = await timeoutify(request, 1000); test.strictSame(response, undefined); test.end(); - } catch (err) { + } catch { test.error(new Error('Should not be executed')); } }); diff --git a/test/semaphore.js b/test/semaphore.js index 3f8fc5d9..98fe6c30 100644 --- a/test/semaphore.js +++ b/test/semaphore.js @@ -97,13 +97,13 @@ metatests.test('Semaphore real life usage', async (test) => { const useSemaphore = async () => { try { await semaphore.enter(); - } catch (e) { + } catch { return; } try { await delay(1000); return; - } catch (e) { + } catch { return; } finally { semaphore.leave();