1 // Copyright (C) 2020 Rick Waldron. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-string.prototype.at
6 Property type and descriptor.
8 String.prototype.at( index )
10 Let relativeIndex be ? ToInteger(index).
12 features: [String.prototype.at]
14 assert.sameValue(typeof String.prototype.at, 'function');
16 let valueOfCallCount = 0;
26 assert.sameValue(s.at(index), '1', 's.at({valueOf() {valueOfCallCount++; return 1;}}) must return 1');
27 assert.sameValue(valueOfCallCount, 1, 'The value of `valueOfCallCount` is 1');