From 0d80df251fd94ddcc0c301031311a5f0577a3e93 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Mon, 11 Oct 2021 10:45:56 -0700 Subject: [PATCH] [KeyVault][Test] remove async iterator polyfill (#18108) since Node 8 is no longer supported. --- sdk/keyvault/keyvault-admin/test/utils/common.ts | 5 ----- .../keyvault-certificates/test/utils/utils.common.ts | 5 ----- sdk/keyvault/keyvault-keys/test/utils/utils.common.ts | 5 ----- sdk/keyvault/keyvault-secrets/test/utils/utils.common.ts | 5 ----- 4 files changed, 20 deletions(-) diff --git a/sdk/keyvault/keyvault-admin/test/utils/common.ts b/sdk/keyvault/keyvault-admin/test/utils/common.ts index 20084e11867c..859d0631d685 100644 --- a/sdk/keyvault/keyvault-admin/test/utils/common.ts +++ b/sdk/keyvault/keyvault-admin/test/utils/common.ts @@ -4,11 +4,6 @@ import * as assert from "assert"; import { env } from "@azure-tools/test-recorder"; -// Async iterator's polyfill for Node 8 -if (!Symbol || !(Symbol as any).asyncIterator) { - (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); -} - export async function assertThrowsAbortError(cb: () => Promise): Promise { let passed = false; try { diff --git a/sdk/keyvault/keyvault-certificates/test/utils/utils.common.ts b/sdk/keyvault/keyvault-certificates/test/utils/utils.common.ts index f41ec3d5582e..9e357729a6bf 100644 --- a/sdk/keyvault/keyvault-certificates/test/utils/utils.common.ts +++ b/sdk/keyvault/keyvault-certificates/test/utils/utils.common.ts @@ -4,11 +4,6 @@ import { env } from "@azure-tools/test-recorder"; import * as assert from "assert"; -// Async iterator's polyfill for Node 8 -if (!Symbol || !(Symbol as any).asyncIterator) { - (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); -} - export function getKeyvaultName(): string { const keyVaultEnvVarName = "KEYVAULT_NAME"; const keyVaultName: string | undefined = env[keyVaultEnvVarName]; diff --git a/sdk/keyvault/keyvault-keys/test/utils/utils.common.ts b/sdk/keyvault/keyvault-keys/test/utils/utils.common.ts index 99e779a2bb05..94d5f6a51633 100644 --- a/sdk/keyvault/keyvault-keys/test/utils/utils.common.ts +++ b/sdk/keyvault/keyvault-keys/test/utils/utils.common.ts @@ -6,11 +6,6 @@ import { env } from "@azure-tools/test-recorder"; import * as assert from "assert"; import { LATEST_API_VERSION } from "../../src/keysModels"; -// Async iterator's polyfill for Node 8 -if (!Symbol || !(Symbol as any).asyncIterator) { - (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); -} - export function getKeyvaultName(): string { const keyVaultEnvVarName = "KEYVAULT_NAME"; const keyVaultName: string | undefined = env[keyVaultEnvVarName]; diff --git a/sdk/keyvault/keyvault-secrets/test/utils/utils.common.ts b/sdk/keyvault/keyvault-secrets/test/utils/utils.common.ts index dc16169c23a4..1b65fd67ad31 100644 --- a/sdk/keyvault/keyvault-secrets/test/utils/utils.common.ts +++ b/sdk/keyvault/keyvault-secrets/test/utils/utils.common.ts @@ -3,11 +3,6 @@ import * as assert from "assert"; -// Async iterator's polyfill for Node 8 -if (!Symbol || !(Symbol as any).asyncIterator) { - (Symbol as any).asyncIterator = Symbol.for("Symbol.asyncIterator"); -} - export async function assertThrowsAbortError(cb: () => Promise): Promise { let passed = false; try {