blob: a53096dc9fab7479bcb0558ae406be1278a1b661 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global');
shouldBe(JSON.stringify(descriptor), '{"enumerable":false,"configurable":true}');
shouldBe(descriptor.enumerable, false);
shouldBe(descriptor.configurable, true);
shouldBe(descriptor.set, undefined);
shouldBe(typeof descriptor.get, 'function');