Enumerator-deprecated.js 781 B

123456789101112131415161718192021
  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. WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js", "self");
  6. var tests = {
  7. test01: {
  8. name: "Check that Enumerator is deprecated for HostType = Application",
  9. body: function () {
  10. assert.throws(
  11. function() {
  12. var arr = ["x", "y"];
  13. var enu = new Enumerator(arr);
  14. }, ReferenceError);
  15. }
  16. },
  17. };
  18. testRunner.runTests(tests);