Skip to content

Commit

Permalink
Update has-property test
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrttn committed Nov 28, 2023
1 parent 555b366 commit 2e4fe39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/has-property/src/has-property.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { test } from 'node:test'
import assert from 'node:assert'
import { hasProperty } from './has-property'

test('hasProperty', () => {
expect(hasProperty({ foo: 'bar' }, 'foo')).toBe(true)
expect(hasProperty({ foo: 'bar' }, 'bar')).toBe(false)
expect(hasProperty({ foo: 'bar' }, 'constructor')).toBe(false)
expect(hasProperty('foo', 'foo')).toBe(false)
assert.ok(hasProperty({ foo: 'bar' }, 'foo'))
assert.strictEqual(hasProperty({ foo: 'bar' }, 'bar'), false)
assert.strictEqual(hasProperty({ foo: 'bar' }, 'constructor'), false)
assert.strictEqual(hasProperty('foo', 'foo'), false)
})

0 comments on commit 2e4fe39

Please sign in to comment.