Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/values/primitive-strings.js

raw
1 // Copyright (C) 2015 Jordan Harband. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-object.values
6 description: Object.values accepts string primitives.
7 author: Jordan Harband
8 ---*/
9
10 var result = Object.values('abc');
11
12 assert.sameValue(Array.isArray(result), true, 'result is an array');
13 assert.sameValue(result.length, 3, 'result has 3 items');
14
15 assert.sameValue(result[0], 'a', 'first value is "a"');
16 assert.sameValue(result[1], 'b', 'second value is "b"');
17 assert.sameValue(result[2], 'c', 'third value is "c"');