global_object.js 1.0 KB

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 (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch
  6. this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
  7. }
  8. var tests = [
  9. {
  10. name: "Test BigInt global object properties",
  11. body: function () {
  12. assert.isTrue(BigInt.length == 1);
  13. assert.isTrue(BigInt.name == "BigInt");
  14. assert.isTrue(BigInt.prototype == "[object Object]");
  15. assert.isTrue(BigInt.prototype.constructor === BigInt);
  16. assert.isTrue(BigInt.__proto__ === Function.prototype);
  17. }
  18. },
  19. ];
  20. testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });