From 4cc081815d2a10ef327d935725bfa9c742badcf1 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 29 Jan 2023 20:15:22 +0200 Subject: [PATCH] test: add trailing commas in `test/message` PR-URL: /~https://github.com/nodejs/node/pull/46372 Reviewed-By: Moshe Atlow Reviewed-By: Geoffrey Booth Reviewed-By: James M Snell --- test/.eslintrc.yaml | 1 - test/message/async_error_eval_cjs.js | 2 +- test/message/async_error_eval_esm.js | 2 +- test/message/console_low_stack_space.js | 2 +- test/message/test_runner_describe_it.js | 4 ++-- test/message/test_runner_output.js | 4 ++-- test/message/test_runner_test_name_pattern.js | 2 +- test/message/util-inspect-error-cause.js | 6 +++--- test/message/vm_dont_display_runtime_error.js | 4 ++-- test/message/vm_dont_display_syntax_error.js | 4 ++-- 10 files changed, 15 insertions(+), 16 deletions(-) diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index ebea1fa515eaeb..7be4848551c01c 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -79,7 +79,6 @@ overrides: - internet/*.js - js-native-api/*/*.js - known_issues/*.js - - message/*.js - node-api/*/*.js - parallel/*.js - parallel/*.mjs diff --git a/test/message/async_error_eval_cjs.js b/test/message/async_error_eval_cjs.js index 820507beda9937..d76cabeab116d7 100644 --- a/test/message/async_error_eval_cjs.js +++ b/test/message/async_error_eval_cjs.js @@ -29,7 +29,7 @@ main(); '-e', main, ], { - env: { ...process.env } + env: { ...process.env }, }); if (child.status !== 0) { diff --git a/test/message/async_error_eval_esm.js b/test/message/async_error_eval_esm.js index dfab2b8a8264e9..efacef779b1712 100644 --- a/test/message/async_error_eval_esm.js +++ b/test/message/async_error_eval_esm.js @@ -31,7 +31,7 @@ main(); '-e', main, ], { - env: { ...process.env } + env: { ...process.env }, }); if (child.status !== 0) { diff --git a/test/message/console_low_stack_space.js b/test/message/console_low_stack_space.js index 4834ffd9cd0b36..8954b777d464f6 100644 --- a/test/message/console_low_stack_space.js +++ b/test/message/console_low_stack_space.js @@ -4,7 +4,7 @@ const consoleDescriptor = Object.getOwnPropertyDescriptor(global, 'console'); Object.defineProperty(global, 'console', { configurable: true, writable: true, - value: {} + value: {}, }); require('../common'); diff --git a/test/message/test_runner_describe_it.js b/test/message/test_runner_describe_it.js index e163fed3420a75..510eacff9add28 100644 --- a/test/message/test_runner_describe_it.js +++ b/test/message/test_runner_describe_it.js @@ -270,7 +270,7 @@ it('custom inspect symbol fail', () => { [util.inspect.custom]() { return 'customized'; }, - foo: 1 + foo: 1, }; throw obj; @@ -281,7 +281,7 @@ it('custom inspect symbol that throws fail', () => { [util.inspect.custom]() { throw new Error('bad-inspect'); }, - foo: 1 + foo: 1, }; throw obj; diff --git a/test/message/test_runner_output.js b/test/message/test_runner_output.js index c29402ad33521d..91caca3038e7b8 100644 --- a/test/message/test_runner_output.js +++ b/test/message/test_runner_output.js @@ -303,7 +303,7 @@ test('custom inspect symbol fail', () => { [util.inspect.custom]() { return 'customized'; }, - foo: 1 + foo: 1, }; throw obj; @@ -314,7 +314,7 @@ test('custom inspect symbol that throws fail', () => { [util.inspect.custom]() { throw new Error('bad-inspect'); }, - foo: 1 + foo: 1, }; throw obj; diff --git a/test/message/test_runner_test_name_pattern.js b/test/message/test_runner_test_name_pattern.js index 86bc45d7d4c85d..738feafe31eced 100644 --- a/test/message/test_runner_test_name_pattern.js +++ b/test/message/test_runner_test_name_pattern.js @@ -28,7 +28,7 @@ test('top level test enabled', common.mustCall(async (t) => { t.afterEach(common.mustCall()); await t.test( 'nested test runs because name includes PATTERN', - common.mustCall() + common.mustCall(), ); })); diff --git a/test/message/util-inspect-error-cause.js b/test/message/util-inspect-error-cause.js index 23c2b20d8633b2..d34a908d374975 100644 --- a/test/message/util-inspect-error-cause.js +++ b/test/message/util-inspect-error-cause.js @@ -19,11 +19,11 @@ const cause5 = new Error('Object cause', { message: 'Unique', name: 'Error', stack: 'Error: Unique\n' + - ' at Module._compile (node:internal/modules/cjs/loader:827:30)' - } + ' at Module._compile (node:internal/modules/cjs/loader:827:30)', + }, }); const cause6 = new Error('undefined cause', { - cause: undefined + cause: undefined, }); console.log(cause4); diff --git a/test/message/vm_dont_display_runtime_error.js b/test/message/vm_dont_display_runtime_error.js index 44bdaf42d9b234..2dff567fb9e4c6 100644 --- a/test/message/vm_dont_display_runtime_error.js +++ b/test/message/vm_dont_display_runtime_error.js @@ -30,7 +30,7 @@ console.error('beginning'); try { vm.runInThisContext('throw new Error("boo!")', { filename: 'test.vm', - displayErrors: false + displayErrors: false, }); } catch { // Continue regardless of error. @@ -40,7 +40,7 @@ console.error('middle'); vm.runInThisContext('throw new Error("boo!")', { filename: 'test.vm', - displayErrors: false + displayErrors: false, }); console.error('end'); diff --git a/test/message/vm_dont_display_syntax_error.js b/test/message/vm_dont_display_syntax_error.js index 01ab0b6395c69b..821933a6113bb9 100644 --- a/test/message/vm_dont_display_syntax_error.js +++ b/test/message/vm_dont_display_syntax_error.js @@ -30,7 +30,7 @@ console.error('beginning'); try { vm.runInThisContext('var 5;', { filename: 'test.vm', - displayErrors: false + displayErrors: false, }); } catch { // Continue regardless of error. @@ -40,7 +40,7 @@ console.error('middle'); vm.runInThisContext('var 5;', { filename: 'test.vm', - displayErrors: false + displayErrors: false, }); console.error('end');