Skip to content

Commit 36a543c

Browse files
authored
refactor(test/spec/openapi/option): use Object.hasOwn() (#831)
Signed-off-by: Frazer Smith <[email protected]>
1 parent 2628bdb commit 36a543c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/spec/openapi/option.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ test('parameter & header examples', async t => {
520520
const { parameters } = openapiObject.paths['/'].post
521521

522522
t.ok(parameters.every(({ example }) => example === 'world'))
523-
t.ok(parameters.every(param => !Object.prototype.hasOwnProperty.call(param, 'examples')))
523+
t.ok(parameters.every(param => !Object.hasOwn(param, 'examples')))
524524
})
525525

526526
t.test('uses .examples if has multiple examples', async t => {
@@ -545,7 +545,7 @@ test('parameter & header examples', async t => {
545545
world: { value: 'world' },
546546
universe: { value: 'universe' }
547547
}))
548-
t.ok(parameters.every(param => !Object.prototype.hasOwnProperty.call(param, 'example')))
548+
t.ok(parameters.every(param => !Object.hasOwn(param, 'example')))
549549
})
550550
})
551551

0 commit comments

Comments
 (0)