From a259b9519cc5988f459ffe020d5815380703f60f Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sat, 23 Sep 2023 11:50:36 +0530 Subject: [PATCH 1/6] test: replace forEach with for..of in test-fs-readv.js --- test/parallel/test-fs-readv-sync.js | 8 ++++---- test/parallel/test-fs-readv.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 22f28c7830e746..07feecc129b095 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -66,21 +66,21 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; { const fd = fs.openSync(filename, 'r'); - wrongInputs.forEach((wrongInput) => { + for(const wrongInput of wrongInputs) { assert.throws( () => fs.readvSync(fd, wrongInput, null), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' } ); - }); + }; fs.closeSync(fd); } { // fs.readv with wrong fd argument - wrongInputs.forEach((wrongInput) => { + for(const wrongInput of wrongInputs) { assert.throws( () => fs.readvSync(wrongInput), { @@ -88,5 +88,5 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }); + }; } diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index aa24c3e06ba4de..30c3662e9a90ea 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -68,21 +68,21 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; const fd = fs.openSync(filename, 'r'); - wrongInputs.forEach((wrongInput) => { + for(const wrongInput of wrongInputs) { assert.throws( () => fs.readv(fd, wrongInput, null, common.mustNotCall()), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' } ); - }); + }; fs.closeSync(fd); } { // fs.readv with wrong fd argument - wrongInputs.forEach((wrongInput) => { + for(const wrongInput of wrongInputs) { assert.throws( () => fs.readv(wrongInput, common.mustNotCall()), { @@ -90,5 +90,5 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }); + }; } From c98662d97450826bad6e3f8c63deaa9fd4743533 Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sun, 24 Sep 2023 15:19:09 +0530 Subject: [PATCH 2/6] test: replace forEach with for..of in test-fs-readv.js --- test/parallel/test-fs-readv-sync.js | 4 ++-- test/parallel/test-fs-readv.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 07feecc129b095..783dde2033d152 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -73,7 +73,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }; + } fs.closeSync(fd); } @@ -88,5 +88,5 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }; + } } diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index 30c3662e9a90ea..c0fbd011de017d 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -75,7 +75,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }; + } fs.closeSync(fd); } @@ -90,5 +90,5 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; name: 'TypeError' } ); - }; + } } From 740007379a1a7655b739630169233a00b68ac318 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 18 Oct 2023 21:48:35 +0200 Subject: [PATCH 3/6] Update test/parallel/test-fs-readv-sync.js --- test/parallel/test-fs-readv-sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 783dde2033d152..31f0d1a428854d 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -66,7 +66,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; { const fd = fs.openSync(filename, 'r'); - for(const wrongInput of wrongInputs) { + for (const wrongInput of wrongInputs) { assert.throws( () => fs.readvSync(fd, wrongInput, null), { code: 'ERR_INVALID_ARG_TYPE', From f5991ee16a412d9fc4e1e03eee2db28173fecefc Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 18 Oct 2023 21:48:42 +0200 Subject: [PATCH 4/6] Update test/parallel/test-fs-readv-sync.js --- test/parallel/test-fs-readv-sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index 31f0d1a428854d..548f54cbb9e3b2 100644 --- a/test/parallel/test-fs-readv-sync.js +++ b/test/parallel/test-fs-readv-sync.js @@ -80,7 +80,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; { // fs.readv with wrong fd argument - for(const wrongInput of wrongInputs) { + for (const wrongInput of wrongInputs) { assert.throws( () => fs.readvSync(wrongInput), { From 7ce03787da72e8e9c3dc98655bc30e6af5a2df7a Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 18 Oct 2023 21:48:48 +0200 Subject: [PATCH 5/6] Update test/parallel/test-fs-readv.js --- test/parallel/test-fs-readv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index c0fbd011de017d..ceb08386da58a0 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -68,7 +68,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; const fd = fs.openSync(filename, 'r'); - for(const wrongInput of wrongInputs) { + for (const wrongInput of wrongInputs) { assert.throws( () => fs.readv(fd, wrongInput, null, common.mustNotCall()), { code: 'ERR_INVALID_ARG_TYPE', From 60fef398675846381e9a44bd644ccf8a624c7b98 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 18 Oct 2023 21:48:54 +0200 Subject: [PATCH 6/6] Update test/parallel/test-fs-readv.js --- test/parallel/test-fs-readv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-readv.js b/test/parallel/test-fs-readv.js index ceb08386da58a0..b1cbd83ce6f2df 100644 --- a/test/parallel/test-fs-readv.js +++ b/test/parallel/test-fs-readv.js @@ -82,7 +82,7 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; { // fs.readv with wrong fd argument - for(const wrongInput of wrongInputs) { + for (const wrongInput of wrongInputs) { assert.throws( () => fs.readv(wrongInput, common.mustNotCall()), {