Skip to content

Commit

Permalink
refactor(test/spec/openapi/option): use Object.hasOwn() (#831)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
  • Loading branch information
Fdawgs authored Oct 19, 2024
1 parent 2628bdb commit 36a543c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/spec/openapi/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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')))
})
})

Expand Down

0 comments on commit 36a543c

Please sign in to comment.