blob: 6e214fc4160cb0293d5db5e6fc0709f8b9f9c2ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (C) 2018 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: The `this` value cannot be coerced into an object
info: |
String.prototype.matchAll ( regexp )
1. Let O be RequireObjectCoercible(this value).
features: [String.prototype.matchAll]
---*/
var matchAll = String.prototype.matchAll;
assert.sameValue(typeof matchAll, 'function');
assert.throws(TypeError, function() {
matchAll.call(undefined);
}, 'undefined');
assert.throws(TypeError, function() {
matchAll.call(null);
}, 'null');
reportCompare(0, 0);
|