diff options
Diffstat (limited to 'deps/v8/test/mjsunit/array-prototype-every.js')
-rw-r--r-- | deps/v8/test/mjsunit/array-prototype-every.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/array-prototype-every.js b/deps/v8/test/mjsunit/array-prototype-every.js new file mode 100644 index 00000000000..a9e415e084a --- /dev/null +++ b/deps/v8/test/mjsunit/array-prototype-every.js @@ -0,0 +1,20 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/* Test behaviors when the prototype has elements */ + +// every + +(function () { + var array = [,]; + + function every() { + return array.every(v => v > 0); + } + + assertEquals(every(), true); + + array.__proto__.push(-6); + assertEquals(every(), false); +})(); |