diff options
Diffstat (limited to 'test/built-ins/Reflect/enumerate/target-is-not-object-throws.js')
-rw-r--r-- | test/built-ins/Reflect/enumerate/target-is-not-object-throws.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/built-ins/Reflect/enumerate/target-is-not-object-throws.js b/test/built-ins/Reflect/enumerate/target-is-not-object-throws.js new file mode 100644 index 000000000..8c0dc6144 --- /dev/null +++ b/test/built-ins/Reflect/enumerate/target-is-not-object-throws.js @@ -0,0 +1,28 @@ +// 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.5 +description: > + Throws a TypeError if target is not an Object. +info: > + 26.1.5 Reflect.enumerate ( target ) + + 1. If Type(target) is not Object, throw a TypeError exception. + ... +---*/ + +assert.throws(TypeError, function() { + Reflect.enumerate(1); +}); + +assert.throws(TypeError, function() { + Reflect.enumerate(null); +}); + +assert.throws(TypeError, function() { + Reflect.enumerate(undefined); +}); + +assert.throws(TypeError, function() { + Reflect.enumerate(''); +}); |