]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function shouldBe(actual, expected) { |
2 | if (actual !== expected) | |
3 | throw new Error('bad value: ' + actual); | |
4 | } | |
5 | ||
6 | var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); | |
7 | shouldBe(JSON.stringify(descriptor), '{"enumerable":false,"configurable":true}'); | |
8 | ||
9 | shouldBe(descriptor.enumerable, false); | |
10 | shouldBe(descriptor.configurable, true); | |
11 | shouldBe(descriptor.set, undefined); | |
12 | shouldBe(typeof descriptor.get, 'function'); |