Skip to content
Snippets Groups Projects
Commit 3f420039 authored by Valerie R Young's avatar Valerie R Young Committed by Rick Waldron
Browse files

Add object coercible tests for trim(start/End)

parent 5931e313
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: The "this" value must be object-coercible
info: |
1. Let O be ? RequireObjectCoercible(this value).
---*/
var trimEnd = String.prototype.trimEnd;
assert.sameValue(typeof trimEnd, 'function');
assert.throws(TypeError, function() {
trimEnd.call(undefined);
}, 'undefined');
assert.throws(TypeError, function() {
trimEnd.call(null);
}, 'null');
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: The "this" value must be object-coercible
info: |
1. Let O be ? RequireObjectCoercible(this value).
---*/
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');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment