blob: 141a2af5a0450bb639b8e298a7c0161b71595947 [file] [log] [blame]
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-string.prototype.trimStart
description: The "this" value must be object-coercible
info: |
1. Let O be ? RequireObjectCoercible(this value).
features: [string-trimming, String.prototype.trimStart]
---*/
var trimStart = String.prototype.trimStart;
assert.sameValue(typeof trimStart, 'function');
assert.throws(TypeError, function() {
trimStart.call(undefined);
}, 'undefined');
assert.throws(TypeError, function() {
trimStart.call(null);
}, 'null');