Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Reflect / ownKeys / target-is-not-object-throws.js
blobf894d475df9ccccb38a24ad2b3a1a3c42329a51e
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 26.1.11
5 description: >
6   Throws a TypeError if target is not an Object.
7 info: |
8   26.1.11 Reflect.ownKeys ( target )
10   1. If Type(target) is not Object, throw a TypeError exception.
11   ...
12 features: [Reflect]
13 ---*/
15 assert.throws(TypeError, function() {
16   Reflect.ownKeys(1);
17 });
19 assert.throws(TypeError, function() {
20   Reflect.ownKeys(null);
21 });
23 assert.throws(TypeError, function() {
24   Reflect.ownKeys(undefined);
25 });
27 assert.throws(TypeError, function() {
28   Reflect.ownKeys('');
29 });
31 reportCompare(0, 0);