From 36a543cef71d32d434e07b610d6f0b233cbd566e Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 19 Oct 2024 11:05:23 +0100 Subject: [PATCH] refactor(test/spec/openapi/option): use `Object.hasOwn()` (#831) Signed-off-by: Frazer Smith --- test/spec/openapi/option.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/openapi/option.js b/test/spec/openapi/option.js index 6bf83bf7..16a245a7 100644 --- a/test/spec/openapi/option.js +++ b/test/spec/openapi/option.js @@ -520,7 +520,7 @@ test('parameter & header examples', async t => { const { parameters } = openapiObject.paths['/'].post t.ok(parameters.every(({ example }) => example === 'world')) - t.ok(parameters.every(param => !Object.prototype.hasOwnProperty.call(param, 'examples'))) + t.ok(parameters.every(param => !Object.hasOwn(param, 'examples'))) }) t.test('uses .examples if has multiple examples', async t => { @@ -545,7 +545,7 @@ test('parameter & header examples', async t => { world: { value: 'world' }, universe: { value: 'universe' } })) - t.ok(parameters.every(param => !Object.prototype.hasOwnProperty.call(param, 'example'))) + t.ok(parameters.every(param => !Object.hasOwn(param, 'example'))) }) })