(nativeSetProperty)
| 12 | } |
| 13 | |
| 14 | function testShouldThrowErrorIfKeyIsInvalid (nativeSetProperty) { |
| 15 | assert.throws(() => { |
| 16 | nativeSetProperty(undefined, 'test', 1); |
| 17 | }, /Cannot convert undefined or null to object/); |
| 18 | } |
| 19 | |
| 20 | testSetProperty(binding.object.setPropertyWithNapiValue); |
| 21 | testSetProperty(binding.object.setPropertyWithNapiWrapperValue); |