summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/String/prototype/padStart/normal-operation.js
blob: c18a0f58cb499947df4e87849be9a539a1039bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-string.prototype.padstart
description: String#padStart should work in the general case
author: Jordan Harband
---*/

assert.sameValue('abc'.padStart(7, 'def'), 'defdabc');
assert.sameValue('abc'.padStart(5, '*'), '**abc');

// surrogate pairs
assert.sameValue('abc'.padStart(6, '\uD83D\uDCA9'), '\uD83D\uDCA9\uD83Dabc');

reportCompare(0, 0);