summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Reflect/getOwnPropertyDescriptor/undefined-property.js
blob: 3eff63118f7c1d561ba94dde83d4c9f5e72d1d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 26.1.7
description: >
  Return undefined for an undefined property.
info: |
  26.1.7 Reflect.getOwnPropertyDescriptor ( target, propertyKey )

  ...
  4. Let desc be target.[[GetOwnProperty]](key).
  5. ReturnIfAbrupt(desc).
  6. Return FromPropertyDescriptor(desc).

  6.2.4.4 FromPropertyDescriptor ( Desc )

  1. If Desc is undefined, return undefined.
features: [Reflect]
---*/

var result = Reflect.getOwnPropertyDescriptor({}, undefined);
assert.sameValue(result, undefined);

reportCompare(0, 0);