Debian Codegraph @

js/src/tests/non262/regress/regress-591846.js

raw
1 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 */
5
6 // SKIP test262 export
7 // Note that the values for enumerable/configurable are inconsistent with
8 // https://github.com/tc39/proposal-regexp-legacy-features
9
10 // Reset RegExp.leftContext to the empty string.
11 /x/.test('x');
12
13 var d = Object.getOwnPropertyDescriptor(RegExp, "leftContext");
14 assertEq(d.set, undefined);
15 assertEq(typeof d.get, "function");
16 assertEq(d.enumerable, true);
17 assertEq(d.configurable, false);
18 assertEq(d.get.call(RegExp), "");
19
20 reportCompare(0, 0, "ok");