]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/static-getter-descriptors.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / static-getter-descriptors.js
CommitLineData
ed1e77d3
A
1function shouldBe(actual, expected) {
2 if (actual !== expected)
3 throw new Error('bad value: ' + actual);
4}
5
6var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global');
7shouldBe(JSON.stringify(descriptor), '{"enumerable":false,"configurable":true}');
8
9shouldBe(descriptor.enumerable, false);
10shouldBe(descriptor.configurable, true);
11shouldBe(descriptor.set, undefined);
12shouldBe(typeof descriptor.get, 'function');