properties.js 970 B

123456789101112131415161718192021222324
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. if (typeof (WScript) != "undefined") {
  6. WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js", "self");
  7. }
  8. var tests = {
  9. test01: {
  10. name: "RegExp.options property",
  11. body: function () {
  12. var re = /x/i;
  13. var desc = Object.getOwnPropertyDescriptor(re, "options");
  14. var expected = helpers.isCompatVersion9 ?
  15. {enumerable: true, configurable: true, writable: true, value: "i"} :
  16. {enumerable: false, configurable: false, writable: false, value: "i"};
  17. assert.areEqual(expected, desc);
  18. }
  19. },
  20. };
  21. testRunner.run(tests);