Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / String / prototype / toWellFormed / return-abrupt-from-this.js
blob0ebf8a227f348395bbb817b32da33569896be268
1 // Copyright (C) 2022 Jordan Harband. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-string.prototype.towellformed
5 description: >
6   Return abrupt from RequireObjectCoercible(this value).
7 info: |
8   String.prototype.toWellFormed( )
10   1. Let O be ? RequireObjectCoercible(this value).
12 features: [String.prototype.toWellFormed]
13 ---*/
14 assert.sameValue(typeof String.prototype.toWellFormed, 'function');
16 assert.throws(TypeError, function () {
17   String.prototype.toWellFormed.call(undefined);
18 });
20 assert.throws(TypeError, function () {
21   String.prototype.toWellFormed.call(null);
22 });
24 reportCompare(0, 0);