diff --git a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts index 09af44704cb1..41f6cd1d9efc 100644 --- a/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts +++ b/common/tools/eslint-plugin-azure-sdk/tests/rules/ts-package-json-sdktype.ts @@ -109,7 +109,7 @@ const examplePackageGood = `{ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^2.0.1", "@azure/mock-hub": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-perf": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@rollup/plugin-commonjs": "11.0.2", @@ -263,7 +263,7 @@ const examplePackageBad = `{ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^2.0.1", "@azure/mock-hub": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-perf": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@rollup/plugin-commonjs": "11.0.2", diff --git a/rush.json b/rush.json index dd3e6b46c884..3eee8043131f 100644 --- a/rush.json +++ b/rush.json @@ -859,7 +859,7 @@ "versionPolicyName": "utility" }, { - "packageName": "@azure/test-utils", + "packageName": "@azure-tools/test-utils", "projectFolder": "sdk/test-utils/test-utils", "versionPolicyName": "utility" }, @@ -2219,4 +2219,4 @@ "versionPolicyName": "management" } ] -} \ No newline at end of file +} diff --git a/sdk/agrifood/agrifood-farming-rest/package.json b/sdk/agrifood/agrifood-farming-rest/package.json index 3c3549a213b4..87edcb121f82 100644 --- a/sdk/agrifood/agrifood-farming-rest/package.json +++ b/sdk/agrifood/agrifood-farming-rest/package.json @@ -95,7 +95,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json b/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json index e06573e5d4ee..19debb01bdea 100644 --- a/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json +++ b/sdk/apimanagement/api-management-custom-widgets-scaffolder/package.json @@ -82,7 +82,7 @@ "typescript": "~5.4.5", "util": "^0.12.1", "dotenv": "^16.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@types/mustache": "^4.2.1", "sinon": "^17.0.0", "@types/sinon": "^17.0.0" diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index e3192b629223..da5b7b013a93 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -103,7 +103,7 @@ "@azure/keyvault-secrets": "^4.2.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.1.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/appconfiguration/app-configuration/test/public/tracing.spec.ts b/sdk/appconfiguration/app-configuration/test/public/tracing.spec.ts index 44005c84b29a..7007ced50819 100644 --- a/sdk/appconfiguration/app-configuration/test/public/tracing.spec.ts +++ b/sdk/appconfiguration/app-configuration/test/public/tracing.spec.ts @@ -5,7 +5,7 @@ import { Recorder } from "@azure-tools/test-recorder"; import { createAppConfigurationClientForTests, startRecorder } from "./utils/testHelpers"; import { AppConfigurationClient } from "../../src/appConfigurationClient"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("supports tracing", () => { let client: AppConfigurationClient; diff --git a/sdk/cognitivelanguage/ai-language-conversations/package.json b/sdk/cognitivelanguage/ai-language-conversations/package.json index 772cc143f7a0..376d28298a97 100644 --- a/sdk/cognitivelanguage/ai-language-conversations/package.json +++ b/sdk/cognitivelanguage/ai-language-conversations/package.json @@ -33,7 +33,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/logger": "^1.0.3", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/cognitivelanguage/ai-language-conversations/test/public/analyze.spec.ts b/sdk/cognitivelanguage/ai-language-conversations/test/public/analyze.spec.ts index 621a21fff73e..437d43e90095 100644 --- a/sdk/cognitivelanguage/ai-language-conversations/test/public/analyze.spec.ts +++ b/sdk/cognitivelanguage/ai-language-conversations/test/public/analyze.spec.ts @@ -3,7 +3,7 @@ import { AuthMethod, createClient, startRecorder } from "./utils/recordedClient"; import { Context, Suite } from "mocha"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { ConversationAnalysisClient } from "../../src"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; diff --git a/sdk/cognitivelanguage/ai-language-text/package.json b/sdk/cognitivelanguage/ai-language-text/package.json index 36cad9d0476e..ebe5d44f3f9e 100644 --- a/sdk/cognitivelanguage/ai-language-text/package.json +++ b/sdk/cognitivelanguage/ai-language-text/package.json @@ -104,7 +104,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/cognitivelanguage/ai-language-text/test/internal/errorTargets.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/internal/errorTargets.spec.ts index a3e6c281cdd7..1d43b15ec016 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/internal/errorTargets.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/internal/errorTargets.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { createHttpHeaders, PipelineRequest } from "@azure/core-rest-pipeline"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { KnownErrorCode } from "../../src/generated"; import { AnalyzeBatchActionNames } from "../../src/models"; import { TextAnalysisClient } from "../../src/textAnalysisClient"; diff --git a/sdk/cognitivelanguage/ai-language-text/test/internal/models.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/internal/models.spec.ts index cd9efd010928..b4f836b4d0e0 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/internal/models.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/internal/models.spec.ts @@ -4,7 +4,7 @@ import { AnalyzeAction, KnownAnalyzeTextLROTaskKind } from "../../src/generated/models"; import { AnalyzeActionName, AnalyzeBatchActionName } from "../../src"; import { AssertEqual } from "./utils"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Models", function () { it("AnalyzeActionName", function () { diff --git a/sdk/cognitivelanguage/ai-language-text/test/internal/warn_text.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/internal/warn_text.spec.ts index 907fc0fd662a..443cb4eb0a20 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/internal/warn_text.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/internal/warn_text.spec.ts @@ -5,7 +5,7 @@ import { AzureKeyCredential, TextAnalysisClient } from "../../src"; import { createHttpHeaders } from "@azure/core-rest-pipeline"; import sinon from "sinon"; import { setLogLevel } from "@azure/logger"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; function makeClientWithWarnText(content: string): TextAnalysisClient { return new TextAnalysisClient("https://endpoint", new AzureKeyCredential("test"), { @@ -24,7 +24,7 @@ describe("Logging", function () { const content = "The API version 1 is going to be deprecated by some time in the future"; const client = makeClientWithWarnText(content); let spy; - if (isNode) { + if (isNodeLike) { spy = sinon.spy(process.stderr, "write"); } else { spy = sinon.spy(console, "warn"); diff --git a/sdk/cognitivelanguage/ai-language-text/test/node/customTest.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/node/customTest.spec.ts index e1d04606b91a..4231b1699086 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/node/customTest.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/node/customTest.spec.ts @@ -3,7 +3,7 @@ import { assertEnvironmentVariable, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import { AnalyzeBatchActionNames, AzureKeyCredential, TextAnalysisClient } from "../../src"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context, Suite } from "mocha"; import { AuthMethod, createClient, startRecorder } from "../public/utils/recordedClient"; import createAuthoringClient, { TextAuthoringClient } from "@azure/ai-language-textauthoring"; diff --git a/sdk/cognitivelanguage/ai-language-text/test/public/analyze.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/public/analyze.spec.ts index 9b717dace474..274412182ef1 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/public/analyze.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/public/analyze.spec.ts @@ -11,7 +11,7 @@ import { } from "../../src"; import { AuthMethod, createClient, startRecorder } from "./utils/recordedClient"; import { Context, Suite } from "mocha"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { assertActionResults, assertRestError } from "./utils/resultHelper"; import { checkEntityTextOffset, checkOffsetAndLength } from "./utils/stringIndexTypeHelpers"; import { Recorder } from "@azure-tools/test-recorder"; diff --git a/sdk/cognitivelanguage/ai-language-text/test/public/analyzeBatch.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/public/analyzeBatch.spec.ts index ed6284680076..35a571e706bf 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/public/analyzeBatch.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/public/analyzeBatch.spec.ts @@ -13,7 +13,7 @@ import { import { AuthMethod, createClient, startRecorder } from "./utils/recordedClient"; import { Context, Suite } from "mocha"; import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { assertActionsResults, assertRestError } from "./utils/resultHelper"; import { expectation10, diff --git a/sdk/cognitivelanguage/ai-language-text/test/public/clientOptions.spec.ts b/sdk/cognitivelanguage/ai-language-text/test/public/clientOptions.spec.ts index 6cd92190e5d4..0f047f03e7ea 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/public/clientOptions.spec.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/public/clientOptions.spec.ts @@ -5,7 +5,7 @@ import { Context, Suite } from "mocha"; import { createClient, startRecorder } from "./utils/recordedClient"; import { FullOperationResponse } from "@azure/core-client"; import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe(`[API Key] TextAnalysisClient`, function (this: Suite) { let recorder: Recorder; diff --git a/sdk/cognitivelanguage/ai-language-text/test/public/utils/resultHelper.ts b/sdk/cognitivelanguage/ai-language-text/test/public/utils/resultHelper.ts index fb54f1726cca..1944e1bfab0c 100644 --- a/sdk/cognitivelanguage/ai-language-text/test/public/utils/resultHelper.ts +++ b/sdk/cognitivelanguage/ai-language-text/test/public/utils/resultHelper.ts @@ -6,7 +6,7 @@ import { KnownTextAnalysisErrorCode, PagedAnalyzeBatchResult, } from "../../../src/"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { isRestError } from "@azure/core-rest-pipeline"; export async function assertActionsResults( diff --git a/sdk/cognitivelanguage/ai-language-textauthoring/package.json b/sdk/cognitivelanguage/ai-language-textauthoring/package.json index 111e3144ba8f..d183cb9cba6e 100644 --- a/sdk/cognitivelanguage/ai-language-textauthoring/package.json +++ b/sdk/cognitivelanguage/ai-language-textauthoring/package.json @@ -81,7 +81,7 @@ "typescript": "~5.4.5", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "mocha": "^10.0.0", "nyc": "^15.1.0", "ts-node": "^10.0.0", diff --git a/sdk/cognitivelanguage/ai-language-textauthoring/test/public/helloWorld.spec.ts b/sdk/cognitivelanguage/ai-language-textauthoring/test/public/helloWorld.spec.ts index 3c942de37cac..618e0f04f597 100644 --- a/sdk/cognitivelanguage/ai-language-textauthoring/test/public/helloWorld.spec.ts +++ b/sdk/cognitivelanguage/ai-language-textauthoring/test/public/helloWorld.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Suite } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import createAuthoringClient from "../../src"; import { AzureKeyCredential } from "@azure/core-auth"; describe(`Authoring Test`, function (this: Suite) { diff --git a/sdk/communication/communication-alpha-ids/package.json b/sdk/communication/communication-alpha-ids/package.json index cf15a88db406..c75907f16e3c 100644 --- a/sdk/communication/communication-alpha-ids/package.json +++ b/sdk/communication/communication-alpha-ids/package.json @@ -75,7 +75,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-alpha-ids/test/internal/generated_client.spec.ts b/sdk/communication/communication-alpha-ids/test/internal/generated_client.spec.ts index b4d5efa03044..a98bc2e6a487 100644 --- a/sdk/communication/communication-alpha-ids/test/internal/generated_client.spec.ts +++ b/sdk/communication/communication-alpha-ids/test/internal/generated_client.spec.ts @@ -11,7 +11,7 @@ import { AlphaIDsClient as AlphaIDsGeneratedClient } from "../../src/generated/s import { TokenCredential } from "@azure/identity"; import { assert } from "chai"; import { createMockToken } from "../public/utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseClientArguments } from "@azure/communication-common"; import sinon from "sinon"; import { HttpClient, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline"; @@ -39,7 +39,7 @@ export const userAgentPolicy: (policyName: string, customHeader: string) => Pipe return { name: policyName, sendRequest: async (req, next) => { - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; req.headers.set(userAgentHeader, customHeader); return next(req); }, diff --git a/sdk/communication/communication-alpha-ids/test/internal/headers.spec.ts b/sdk/communication/communication-alpha-ids/test/internal/headers.spec.ts index d1de2889024d..c6c9f368ef9b 100644 --- a/sdk/communication/communication-alpha-ids/test/internal/headers.spec.ts +++ b/sdk/communication/communication-alpha-ids/test/internal/headers.spec.ts @@ -10,7 +10,7 @@ import { TokenCredential } from "@azure/identity"; import { assert } from "chai"; import { createMockToken } from "../public/utils/recordedClient"; import { configurationHttpClient } from "../public/utils/mockHttpClients"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import sinon from "sinon"; describe("AlphaIdsClient - headers", function () { @@ -34,14 +34,14 @@ describe("AlphaIdsClient - headers", function () { }); it("[node] sets correct host", function (this: Context) { - if (!isNode) { + if (!isNodeLike) { this.skip(); } assert.equal(request.headers.get("host"), "contoso.spool.azure.local"); }); it("sets correct default user-agent", function () { - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp(`azsdk-js-communication-alpha-ids/${SDK_VERSION}`, "g"), @@ -108,7 +108,7 @@ describe("AlphaIdsClient - headers", function () { request = spy.getCall(0).args[0]; - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp( diff --git a/sdk/communication/communication-alpha-ids/test/public/utils/recordedClient.ts b/sdk/communication/communication-alpha-ids/test/public/utils/recordedClient.ts index 8330b497da0c..160832ebbec8 100644 --- a/sdk/communication/communication-alpha-ids/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-alpha-ids/test/public/utils/recordedClient.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import * as dotenv from "dotenv"; +import * as dotenv from "dotenv"; import { ClientSecretCredential, DefaultAzureCredential, TokenCredential } from "@azure/identity"; import { Recorder, @@ -12,11 +12,11 @@ import { } from "@azure-tools/test-recorder"; import { AlphaIdsClient } from "../../../src"; import { Context } from "mocha"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseConnectionString } from "@azure/communication-common"; import { createMSUserAgentPolicy } from "./msUserAgentPolicy"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } @@ -117,7 +117,7 @@ export async function createRecordedClientWithToken( }; } - if (isNode) { + if (isNodeLike) { credential = new DefaultAzureCredential(); } else { credential = new ClientSecretCredential( diff --git a/sdk/communication/communication-email/package.json b/sdk/communication/communication-email/package.json index f27d09372143..c9765c6108b6 100644 --- a/sdk/communication/communication-email/package.json +++ b/sdk/communication/communication-email/package.json @@ -59,7 +59,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/node": "^18.0.0", diff --git a/sdk/communication/communication-identity/package.json b/sdk/communication/communication-identity/package.json index f9a2489cdce0..9027f5ab3f94 100644 --- a/sdk/communication/communication-identity/package.json +++ b/sdk/communication/communication-identity/package.json @@ -114,7 +114,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/msal-node": "^2.7.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts b/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts index 9177c4d95f62..aaad0d32ca9f 100644 --- a/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts +++ b/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts @@ -13,7 +13,7 @@ import { import { CommunicationIdentityClient, TokenScope } from "../../src"; import { Context } from "mocha"; import { assert } from "chai"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; matrix([[true, false]], async function (useAad: boolean) { describe(`CommunicationIdentityClient [Playback/Live]${useAad ? " [AAD]" : ""}`, function () { diff --git a/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts b/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts index a21fd375baeb..e6831a3502be 100644 --- a/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts +++ b/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts @@ -12,7 +12,7 @@ import { createRecordedCommunicationIdentityClientWithToken, } from "../utils/recordedClient"; import { PublicClientApplication } from "@azure/msal-node"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { assert } from "chai"; diff --git a/sdk/communication/communication-identity/test/public/node/tokenCustomExpiration.node.spec.ts b/sdk/communication/communication-identity/test/public/node/tokenCustomExpiration.node.spec.ts index 0c59cdae6e3d..18a8f7b5ae59 100644 --- a/sdk/communication/communication-identity/test/public/node/tokenCustomExpiration.node.spec.ts +++ b/sdk/communication/communication-identity/test/public/node/tokenCustomExpiration.node.spec.ts @@ -5,7 +5,7 @@ import { CommunicationUserIdentifier } from "@azure/communication-common"; import { Recorder, isLiveMode } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { assert } from "chai"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { CommunicationIdentityClient } from "../../../src/communicationIdentityClient"; import { createRecordedCommunicationIdentityClient, diff --git a/sdk/communication/communication-phone-numbers/package.json b/sdk/communication/communication-phone-numbers/package.json index 5668882cf83f..a789c8f8323a 100644 --- a/sdk/communication/communication-phone-numbers/package.json +++ b/sdk/communication/communication-phone-numbers/package.json @@ -66,7 +66,7 @@ "@azure/core-lro": "^2.2.4", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", + "@azure/core-util": "^1.9.0", "@azure/logger": "^1.0.0", "events": "^3.0.0", "tslib": "^2.2.0" @@ -74,7 +74,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure/identity": "^4.0.1", diff --git a/sdk/communication/communication-phone-numbers/test/public/areaCodes.spec.ts b/sdk/communication/communication-phone-numbers/test/public/areaCodes.spec.ts index e7d626b45d50..ec95e0a598a6 100644 --- a/sdk/communication/communication-phone-numbers/test/public/areaCodes.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/areaCodes.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/countries.spec.ts b/sdk/communication/communication-phone-numbers/test/public/countries.spec.ts index 6780c95f8e28..cc047cd5c4ef 100644 --- a/sdk/communication/communication-phone-numbers/test/public/countries.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/countries.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { setLogLevel } from "@azure/logger"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/get.spec.ts b/sdk/communication/communication-phone-numbers/test/public/get.spec.ts index 3c702d651d4f..3145df594c4f 100644 --- a/sdk/communication/communication-phone-numbers/test/public/get.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/get.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/list.spec.ts b/sdk/communication/communication-phone-numbers/test/public/list.spec.ts index 92fa135231e0..110342df1d09 100644 --- a/sdk/communication/communication-phone-numbers/test/public/list.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/list.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/localities.spec.ts b/sdk/communication/communication-phone-numbers/test/public/localities.spec.ts index 467ef85cca52..e522e5791d96 100644 --- a/sdk/communication/communication-phone-numbers/test/public/localities.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/localities.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/lro.purchaseAndRelease.spec.ts b/sdk/communication/communication-phone-numbers/test/public/lro.purchaseAndRelease.spec.ts index 89294d08b7b8..e1a72cc86f16 100644 --- a/sdk/communication/communication-phone-numbers/test/public/lro.purchaseAndRelease.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/lro.purchaseAndRelease.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/lro.search.spec.ts b/sdk/communication/communication-phone-numbers/test/public/lro.search.spec.ts index 8f5ee5fb89bb..0caef24527b5 100644 --- a/sdk/communication/communication-phone-numbers/test/public/lro.search.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/lro.search.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/lro.update.spec.ts b/sdk/communication/communication-phone-numbers/test/public/lro.update.spec.ts index 1a6646e58c0a..edc6afd80ba7 100644 --- a/sdk/communication/communication-phone-numbers/test/public/lro.update.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/lro.update.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/offerings.spec.ts b/sdk/communication/communication-phone-numbers/test/public/offerings.spec.ts index 0ff17b52a6ef..8d4e82c13c16 100644 --- a/sdk/communication/communication-phone-numbers/test/public/offerings.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/offerings.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/deleteTrunk.spec.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/deleteTrunk.spec.ts index 64b5ff047888..001f975f830e 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/deleteTrunk.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/deleteTrunk.spec.ts @@ -16,7 +16,7 @@ import { listAllTrunks, resetUniqueFqdns, } from "./utils/recordedClient"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; matrix([[true, false]], async function (useAad) { describe(`SipRoutingClient - delete trunk${useAad ? " [AAD]" : ""}`, function () { diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/getRoutes.spec.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/getRoutes.spec.ts index 4b9c9b181390..95b36d773d39 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/getRoutes.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/getRoutes.spec.ts @@ -6,7 +6,7 @@ import { Context } from "mocha"; import { SipRoutingClient } from "../../../src"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; import { clearSipConfiguration, diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/getTrunks.spec.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/getTrunks.spec.ts index 651097740f41..829994f9cf17 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/getTrunks.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/getTrunks.spec.ts @@ -16,7 +16,7 @@ import { listAllTrunks, resetUniqueFqdns, } from "./utils/recordedClient"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; matrix([[true, false]], async function (useAad) { describe(`SipRoutingClient - get trunks${useAad ? " [AAD]" : ""}`, function () { diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/setRoutes.spec.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/setRoutes.spec.ts index 7b8d02d3d0aa..52c5ad387368 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/setRoutes.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/setRoutes.spec.ts @@ -17,7 +17,7 @@ import { listAllTrunks, resetUniqueFqdns, } from "./utils/recordedClient"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; matrix([[true, false]], async function (useAad) { describe(`SipRoutingClient - set routes${useAad ? " [AAD]" : ""}`, function () { diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/setTrunks.spec.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/setTrunks.spec.ts index 25e685203a98..f58b9ee728c2 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/setTrunks.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/setTrunks.spec.ts @@ -17,7 +17,7 @@ import { listAllTrunks, resetUniqueFqdns, } from "./utils/recordedClient"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; matrix([[true, false]], async function (useAad) { describe(`SipRoutingClient - set trunks${useAad ? " [AAD]" : ""}`, function () { diff --git a/sdk/communication/communication-phone-numbers/test/public/siprouting/utils/recordedClient.ts b/sdk/communication/communication-phone-numbers/test/public/siprouting/utils/recordedClient.ts index 7a94432f8d37..edeab68cd9d3 100644 --- a/sdk/communication/communication-phone-numbers/test/public/siprouting/utils/recordedClient.ts +++ b/sdk/communication/communication-phone-numbers/test/public/siprouting/utils/recordedClient.ts @@ -15,12 +15,12 @@ import { import { SipRoutingClient, SipTrunk, SipTrunkRoute } from "../../../../src"; import { parseConnectionString } from "@azure/communication-common"; import { TokenCredential } from "@azure/identity"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { createTestCredential } from "@azure-tools/test-credential"; import { randomUUID } from "@azure/core-util"; import { createMSUserAgentPolicy } from "./msUserAgentPolicy"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } diff --git a/sdk/communication/communication-phone-numbers/test/public/utils/recordedClient.ts b/sdk/communication/communication-phone-numbers/test/public/utils/recordedClient.ts index 7f388f056f25..58c5a2d97247 100644 --- a/sdk/communication/communication-phone-numbers/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-phone-numbers/test/public/utils/recordedClient.ts @@ -14,7 +14,7 @@ import { import { PhoneNumbersClient } from "../../../src"; import { parseConnectionString } from "@azure/communication-common"; import { TokenCredential } from "@azure/identity"; -import { isNode } from "@azure/test-utils"; +import { isNode } from "@azure-tools/test-utils"; import { createTestCredential } from "@azure-tools/test-credential"; import { createMSUserAgentPolicy } from "./msUserAgentPolicy"; diff --git a/sdk/communication/communication-recipient-verification/package.json b/sdk/communication/communication-recipient-verification/package.json index d998e087a560..c4bd9a469936 100644 --- a/sdk/communication/communication-recipient-verification/package.json +++ b/sdk/communication/communication-recipient-verification/package.json @@ -77,7 +77,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-recipient-verification/test/public/utils/recordedClient.ts b/sdk/communication/communication-recipient-verification/test/public/utils/recordedClient.ts index e269899c5d5c..b8f48a311727 100644 --- a/sdk/communication/communication-recipient-verification/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-recipient-verification/test/public/utils/recordedClient.ts @@ -12,10 +12,10 @@ import { } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { RecipientVerificationClient } from "../../../src"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseConnectionString } from "@azure/communication-common"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } @@ -107,7 +107,7 @@ export async function createRecordedClientWithToken( }; } - if (isNode) { + if (isNodeLike) { credential = new DefaultAzureCredential(); } else { credential = new ClientSecretCredential( diff --git a/sdk/communication/communication-rooms/package.json b/sdk/communication/communication-rooms/package.json index dd111d71634f..65d4edccd54c 100644 --- a/sdk/communication/communication-rooms/package.json +++ b/sdk/communication/communication-rooms/package.json @@ -40,7 +40,7 @@ "@azure/core-auth": "^1.3.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "~1.0.0", + "@azure-tools/test-utils": "~1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "~4.3.1", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-short-codes/package.json b/sdk/communication/communication-short-codes/package.json index 9ac094aa321f..6b863df16458 100644 --- a/sdk/communication/communication-short-codes/package.json +++ b/sdk/communication/communication-short-codes/package.json @@ -77,7 +77,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-short-codes/test/internal/generated_client.spec.ts b/sdk/communication/communication-short-codes/test/internal/generated_client.spec.ts index 92bf13d5c9a1..c1ee76771453 100644 --- a/sdk/communication/communication-short-codes/test/internal/generated_client.spec.ts +++ b/sdk/communication/communication-short-codes/test/internal/generated_client.spec.ts @@ -11,7 +11,7 @@ import { ShortCodesClient as ShortCodesGeneratedClient } from "../../src/generat import { TokenCredential } from "@azure/identity"; import { assert } from "chai"; import { createMockToken } from "../public/utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseClientArguments } from "@azure/communication-common"; import sinon from "sinon"; import { HttpClient, PipelineRequest, PipelineResponse } from "@azure/core-rest-pipeline"; @@ -39,7 +39,7 @@ export const userAgentPolicy: (policyName: string, customHeader: string) => Pipe return { name: policyName, sendRequest: async (req, next) => { - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; req.headers.set(userAgentHeader, customHeader); return next(req); }, diff --git a/sdk/communication/communication-short-codes/test/internal/headers.spec.ts b/sdk/communication/communication-short-codes/test/internal/headers.spec.ts index e84de8cae232..d380bd11e557 100644 --- a/sdk/communication/communication-short-codes/test/internal/headers.spec.ts +++ b/sdk/communication/communication-short-codes/test/internal/headers.spec.ts @@ -10,7 +10,7 @@ import { TokenCredential } from "@azure/identity"; import { assert } from "chai"; import { createMockToken } from "../public/utils/recordedClient"; import { getUSProgramBriefHttpClient } from "../public/utils/mockHttpClients"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import sinon from "sinon"; describe("ShortCodesClient - headers", function () { @@ -34,14 +34,14 @@ describe("ShortCodesClient - headers", function () { }); it("[node] sets correct host", function (this: Context) { - if (!isNode) { + if (!isNodeLike) { this.skip(); } assert.equal(request.headers.get("host"), "contoso.spool.azure.local"); }); it("sets correct default user-agent", function () { - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp(`azsdk-js-communication-short-codes/${SDK_VERSION}`, "g"), @@ -108,7 +108,7 @@ describe("ShortCodesClient - headers", function () { request = spy.getCall(0).args[0]; - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp( diff --git a/sdk/communication/communication-short-codes/test/public/utils/recordedClient.ts b/sdk/communication/communication-short-codes/test/public/utils/recordedClient.ts index caeb73eb431c..92c54b64998e 100644 --- a/sdk/communication/communication-short-codes/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-short-codes/test/public/utils/recordedClient.ts @@ -12,11 +12,11 @@ import { } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { ShortCodesClient } from "../../../src"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseConnectionString } from "@azure/communication-common"; import { createMSUserAgentPolicy } from "./msUserAgentPolicy"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } @@ -120,7 +120,7 @@ export async function createRecordedClientWithToken( }; } - if (isNode) { + if (isNodeLike) { credential = new DefaultAzureCredential(); } else { credential = new ClientSecretCredential( diff --git a/sdk/communication/communication-sms/package.json b/sdk/communication/communication-sms/package.json index c515d3721b2e..662226fa50c3 100644 --- a/sdk/communication/communication-sms/package.json +++ b/sdk/communication/communication-sms/package.json @@ -78,7 +78,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/communication/communication-sms/test/internal/smsClient.internal.spec.ts b/sdk/communication/communication-sms/test/internal/smsClient.internal.spec.ts index 3593df3e4447..f175dbb99cd4 100644 --- a/sdk/communication/communication-sms/test/internal/smsClient.internal.spec.ts +++ b/sdk/communication/communication-sms/test/internal/smsClient.internal.spec.ts @@ -9,7 +9,7 @@ */ import { Recorder, isLiveMode, isPlaybackMode } from "@azure-tools/test-recorder"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import * as sinon from "sinon"; import { SmsClient } from "../../src"; diff --git a/sdk/communication/communication-sms/test/public/smsClient.spec.ts b/sdk/communication/communication-sms/test/public/smsClient.spec.ts index 87440fdb2592..8430caafb2c5 100644 --- a/sdk/communication/communication-sms/test/public/smsClient.spec.ts +++ b/sdk/communication/communication-sms/test/public/smsClient.spec.ts @@ -7,7 +7,7 @@ */ import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import sinon from "sinon"; import { SmsClient } from "../../src"; diff --git a/sdk/communication/communication-tiering/package.json b/sdk/communication/communication-tiering/package.json index 9d3a4930adaf..e80ce74d1398 100644 --- a/sdk/communication/communication-tiering/package.json +++ b/sdk/communication/communication-tiering/package.json @@ -77,7 +77,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-tiering/test/public/utils/recordedClient.ts b/sdk/communication/communication-tiering/test/public/utils/recordedClient.ts index 675854c2b353..9f6a19598c11 100644 --- a/sdk/communication/communication-tiering/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-tiering/test/public/utils/recordedClient.ts @@ -12,10 +12,10 @@ import { } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { TieringClient } from "../../../src"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseConnectionString } from "@azure/communication-common"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } @@ -104,7 +104,7 @@ export async function createRecordedClientWithToken( }; } - if (isNode) { + if (isNodeLike) { credential = new DefaultAzureCredential(); } else { credential = new ClientSecretCredential( diff --git a/sdk/communication/communication-toll-free-verification/package.json b/sdk/communication/communication-toll-free-verification/package.json index 437d35ad20cd..c312a82642b6 100644 --- a/sdk/communication/communication-toll-free-verification/package.json +++ b/sdk/communication/communication-toll-free-verification/package.json @@ -76,7 +76,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/communication/communication-toll-free-verification/test/internal/headers.spec.ts b/sdk/communication/communication-toll-free-verification/test/internal/headers.spec.ts index 2c2753a01d1f..e86fe593272f 100644 --- a/sdk/communication/communication-toll-free-verification/test/internal/headers.spec.ts +++ b/sdk/communication/communication-toll-free-verification/test/internal/headers.spec.ts @@ -10,7 +10,7 @@ import { TollFreeVerificationClient } from "../../src"; import { assert } from "chai"; import { configurationHttpClient } from "../public/utils/mockHttpClients"; import { createMockToken } from "../public/utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import sinon from "sinon"; describe("TollFreeVerificationClient - headers", function () { @@ -35,14 +35,14 @@ describe("TollFreeVerificationClient - headers", function () { }); it("[node] sets correct host", function (this: Context) { - if (!isNode) { + if (!isNodeLike) { this.skip(); } assert.equal(request.headers.get("host"), "contoso.spool.azure.local"); }); it("sets correct default user-agent", function () { - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp(`azsdk-js-communication-toll-free-verification/${SDK_VERSION}`, "g"), @@ -109,7 +109,7 @@ describe("TollFreeVerificationClient - headers", function () { request = spy.getCall(0).args[0]; - const userAgentHeader = isNode ? "user-agent" : "x-ms-useragent"; + const userAgentHeader = isNodeLike ? "user-agent" : "x-ms-useragent"; assert.match( request.headers.get(userAgentHeader) as string, new RegExp( diff --git a/sdk/communication/communication-toll-free-verification/test/public/utils/recordedClient.ts b/sdk/communication/communication-toll-free-verification/test/public/utils/recordedClient.ts index 454bcd18b43b..98572e04274d 100644 --- a/sdk/communication/communication-toll-free-verification/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-toll-free-verification/test/public/utils/recordedClient.ts @@ -12,10 +12,10 @@ import { } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { TollFreeVerificationClient } from "../../../src"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { parseConnectionString } from "@azure/communication-common"; -if (isNode) { +if (isNodeLike) { dotenv.config(); } @@ -107,7 +107,7 @@ export async function createRecordedClientWithToken( }; } - if (isNode) { + if (isNodeLike) { credential = new DefaultAzureCredential(); } else { credential = new ClientSecretCredential( diff --git a/sdk/confidentialledger/confidential-ledger-rest/package.json b/sdk/confidentialledger/confidential-ledger-rest/package.json index 581d8bcb87f3..682197f32000 100644 --- a/sdk/confidentialledger/confidential-ledger-rest/package.json +++ b/sdk/confidentialledger/confidential-ledger-rest/package.json @@ -93,7 +93,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/containerregistry/container-registry/package.json b/sdk/containerregistry/container-registry/package.json index 718b5f146172..dc785f7523cc 100644 --- a/sdk/containerregistry/container-registry/package.json +++ b/sdk/containerregistry/container-registry/package.json @@ -90,7 +90,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/containerregistry/container-registry/test/internal/basic.spec.ts b/sdk/containerregistry/container-registry/test/internal/basic.spec.ts index 09f23f8ba404..aadb66dba084 100644 --- a/sdk/containerregistry/container-registry/test/internal/basic.spec.ts +++ b/sdk/containerregistry/container-registry/test/internal/basic.spec.ts @@ -8,7 +8,7 @@ import { assert } from "chai"; import { calculateDigest } from "../../src/utils/digest"; import { Readable } from "stream"; import { parseWWWAuthenticate } from "../../src/utils/wwwAuthenticateParser"; -import { expect } from "@azure/test-utils"; +import { expect } from "@azure-tools/test-utils"; describe("ContainerRegistryClient functional test", async function () { ["", null, undefined].forEach((value) => { diff --git a/sdk/containerregistry/container-registry/test/public/anonymousAccess.spec.ts b/sdk/containerregistry/container-registry/test/public/anonymousAccess.spec.ts index a1ae1e16df8b..9146d41fd809 100644 --- a/sdk/containerregistry/container-registry/test/public/anonymousAccess.spec.ts +++ b/sdk/containerregistry/container-registry/test/public/anonymousAccess.spec.ts @@ -6,7 +6,7 @@ import { Context } from "mocha"; import { ContainerRegistryClient } from "../../src"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; import { createRegistryClient, recorderStartOptions, serviceVersions } from "../utils/utils"; diff --git a/sdk/containerregistry/container-registry/test/public/containerRegistryClient.spec.ts b/sdk/containerregistry/container-registry/test/public/containerRegistryClient.spec.ts index f1cbaa37f762..1973fc09228f 100644 --- a/sdk/containerregistry/container-registry/test/public/containerRegistryClient.spec.ts +++ b/sdk/containerregistry/container-registry/test/public/containerRegistryClient.spec.ts @@ -6,7 +6,7 @@ import { Context } from "mocha"; import { ContainerRegistryClient } from "../../src"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; import { createRegistryClient, recorderStartOptions, serviceVersions } from "../utils/utils"; diff --git a/sdk/containerregistry/container-registry/test/public/containerRegistryContentClient.spec.ts b/sdk/containerregistry/container-registry/test/public/containerRegistryContentClient.spec.ts index 562c430286fc..0893176eb8b3 100644 --- a/sdk/containerregistry/container-registry/test/public/containerRegistryContentClient.spec.ts +++ b/sdk/containerregistry/container-registry/test/public/containerRegistryContentClient.spec.ts @@ -12,7 +12,7 @@ import { KnownManifestMediaType, OciImageManifest, } from "../../src"; -import { assert, versionsToTest } from "@azure/test-utils"; +import { assert, versionsToTest } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createBlobClient, recorderStartOptions, serviceVersions } from "../utils/utils"; import fs from "fs"; diff --git a/sdk/containerregistry/container-registry/test/public/repositoryAndArtifact.spec.ts b/sdk/containerregistry/container-registry/test/public/repositoryAndArtifact.spec.ts index bafe2c08b505..544fef121f4b 100644 --- a/sdk/containerregistry/container-registry/test/public/repositoryAndArtifact.spec.ts +++ b/sdk/containerregistry/container-registry/test/public/repositoryAndArtifact.spec.ts @@ -4,7 +4,7 @@ import { assert } from "chai"; import { Context } from "mocha"; import { ContainerRegistryClient, ContainerRepository } from "../../src"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; import { RestError } from "@azure/core-rest-pipeline"; import { createRegistryClient, recorderStartOptions, serviceVersions } from "../utils/utils"; diff --git a/sdk/containerregistry/container-registry/test/utils/utils.ts b/sdk/containerregistry/container-registry/test/utils/utils.ts index f681a8f05f42..4658b96d0e7b 100644 --- a/sdk/containerregistry/container-registry/test/utils/utils.ts +++ b/sdk/containerregistry/container-registry/test/utils/utils.ts @@ -9,7 +9,8 @@ import { ContainerRegistryClient, KnownContainerRegistryAudience, } from "../../src"; -import { createXhrHttpClient, isNode } from "@azure/test-utils"; +import { createXhrHttpClient } from "@azure-tools/test-utils"; +import { isNodeLike } from "@azure/core-util"; // When the recorder observes the values of these environment variables in any // recorded HTTP request or response, it will replace them with the values they @@ -98,7 +99,7 @@ export function createRegistryClient( const authorityHost = getAuthority(endpoint); const audience = getAudience(authorityHost); const tokenCredentialOptions = authorityHost ? { authorityHost } : undefined; - const httpClient = isNode || isLiveMode() ? undefined : createXhrHttpClient(); + const httpClient = isNodeLike || isLiveMode() ? undefined : createXhrHttpClient(); const clientOptions = { audience, serviceVersion: serviceVersion as ContainerRegistryServiceVersions, diff --git a/sdk/core/core-http-compat/package.json b/sdk/core/core-http-compat/package.json index 1aa92752c0c1..c8a208178fcf 100644 --- a/sdk/core/core-http-compat/package.json +++ b/sdk/core/core-http-compat/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@microsoft/api-extractor": "^7.40.3", "@vitest/browser": "^1.3.1", diff --git a/sdk/easm/defender-easm-rest/package.json b/sdk/easm/defender-easm-rest/package.json index 445136d5ba50..de9cbf419b4c 100644 --- a/sdk/easm/defender-easm-rest/package.json +++ b/sdk/easm/defender-easm-rest/package.json @@ -74,7 +74,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/entra/functions-authentication-events/package.json b/sdk/entra/functions-authentication-events/package.json index 30589d3d8459..24a6a81a865c 100644 --- a/sdk/entra/functions-authentication-events/package.json +++ b/sdk/entra/functions-authentication-events/package.json @@ -66,7 +66,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.4", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/eventgrid/eventgrid-namespaces/package.json b/sdk/eventgrid/eventgrid-namespaces/package.json index 9eaf87622915..35cc9424d1a0 100644 --- a/sdk/eventgrid/eventgrid-namespaces/package.json +++ b/sdk/eventgrid/eventgrid-namespaces/package.json @@ -86,7 +86,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/service-bus": "^7.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", diff --git a/sdk/eventgrid/eventgrid-namespaces/test/public/eventGridNamespacesClient.spec.ts b/sdk/eventgrid/eventgrid-namespaces/test/public/eventGridNamespacesClient.spec.ts index 51b9c6d4c740..c868f1eb69a8 100644 --- a/sdk/eventgrid/eventgrid-namespaces/test/public/eventGridNamespacesClient.spec.ts +++ b/sdk/eventgrid/eventgrid-namespaces/test/public/eventGridNamespacesClient.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { Suite, Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Recorder, env } from "@azure-tools/test-recorder"; import { EventGridClient as EventGridNamespacesClient, diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index df636b3f0274..553a18017198 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -103,7 +103,8 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/service-bus": "^7.0.0", - "@azure/test-utils": "^1.0.0", + "@azure/core-util": "^1.9.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", diff --git a/sdk/eventgrid/eventgrid/test/public/eventGridClient.spec.ts b/sdk/eventgrid/eventgrid/test/public/eventGridClient.spec.ts index 55ca38126496..6f2ac7df3038 100644 --- a/sdk/eventgrid/eventgrid/test/public/eventGridClient.spec.ts +++ b/sdk/eventgrid/eventgrid/test/public/eventGridClient.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Suite, Context } from "mocha"; import { Recorder } from "@azure-tools/test-recorder"; diff --git a/sdk/eventgrid/eventgrid/test/public/generateSharedAccessSignature.spec.ts b/sdk/eventgrid/eventgrid/test/public/generateSharedAccessSignature.spec.ts index be66d0d520f3..4bf8c452a9e2 100644 --- a/sdk/eventgrid/eventgrid/test/public/generateSharedAccessSignature.spec.ts +++ b/sdk/eventgrid/eventgrid/test/public/generateSharedAccessSignature.spec.ts @@ -5,14 +5,14 @@ import { assert } from "chai"; import { AzureKeyCredential, generateSharedAccessSignature } from "../../src"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe("generateSharedAccessSignature", function () { it("generates the correct signiture", async () => { // This is not a real key, it's the base64 encoding of "this is not a real EventGrid key", which happens to be the same // number of bytes as an actual EventGrid Access Key. const keyAsString = "this is not a real EventGrid key"; - const key = isNode ? Buffer.from(keyAsString).toString("base64") : btoa(keyAsString); + const key = isNodeLike ? Buffer.from(keyAsString).toString("base64") : btoa(keyAsString); const topicUrl = "https://eg-topic.westus-2.eventgrid.azure.net/api/events"; const sig = await generateSharedAccessSignature( diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index 61fa388d127c..7898ebc9edc8 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -116,7 +116,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/mock-hub": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/async-lock": "^1.1.0", diff --git a/sdk/eventhub/event-hubs/test/internal/cbsSession.spec.ts b/sdk/eventhub/event-hubs/test/internal/cbsSession.spec.ts index 19b261acb684..1e199a21890b 100644 --- a/sdk/eventhub/event-hubs/test/internal/cbsSession.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/cbsSession.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { testWithServiceTypes } from "../public/utils/testWithServiceTypes"; import { EnvVarKeys, getEnvVars } from "../public/utils/testUtils"; import { createMockServer } from "../public/utils/mockService"; diff --git a/sdk/eventhub/event-hubs/test/internal/checkOnInterval.spec.ts b/sdk/eventhub/event-hubs/test/internal/checkOnInterval.spec.ts index 67ba6f7aff0e..2845d3687c96 100644 --- a/sdk/eventhub/event-hubs/test/internal/checkOnInterval.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/checkOnInterval.spec.ts @@ -3,7 +3,7 @@ import * as sinon from "sinon"; import { AbortController } from "@azure/abort-controller"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { checkOnInterval } from "../../src/partitionReceiver"; describe("checkOnInterval", function () { diff --git a/sdk/eventhub/event-hubs/test/internal/client.spec.ts b/sdk/eventhub/event-hubs/test/internal/client.spec.ts index 2a68dea277a9..57535eaa2f94 100644 --- a/sdk/eventhub/event-hubs/test/internal/client.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/client.spec.ts @@ -18,7 +18,7 @@ import debugModule from "debug"; import { getRuntimeInfo } from "../../src/util/runtimeInfo"; import { packageJsonInfo } from "../../src/util/constants"; import { testWithServiceTypes } from "../public/utils/testWithServiceTypes"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; const should = chai.should(); chai.use(chaiAsPromised); @@ -28,7 +28,7 @@ const debug = debugModule("azure:event-hubs:client-spec"); const testFailureMessage = "Test failure"; function validateConnectionError(err: E): void { should.exist(err.code, "Missing code on error object."); - if (!isNode) { + if (!isNodeLike) { should.equal(err.code, "ServiceCommunicationError"); } should.not.equal(err.message, testFailureMessage); @@ -604,7 +604,7 @@ testWithServiceTypes((serviceVersion) => { ); should.equal(properties!.product, "MSJSClient"); should.equal(properties!.version, packageVersion); - if (isNode) { + if (isNodeLike) { should.equal(properties!.framework, `Node/${process.version}`); } else { should.equal(properties!.framework.startsWith("Browser/"), true); diff --git a/sdk/eventhub/event-hubs/test/internal/createTimerLoop.spec.ts b/sdk/eventhub/event-hubs/test/internal/createTimerLoop.spec.ts index 4c5875662279..30e33e2f5be0 100644 --- a/sdk/eventhub/event-hubs/test/internal/createTimerLoop.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/createTimerLoop.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as sinon from "sinon"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createTimerLoop } from "../../src/util/timerLoop"; describe("createTimerLoop", function () { diff --git a/sdk/eventhub/event-hubs/test/internal/diagnostics/tracing.spec.ts b/sdk/eventhub/event-hubs/test/internal/diagnostics/tracing.spec.ts index 2baaedebadef..e1cdecb14a38 100644 --- a/sdk/eventhub/event-hubs/test/internal/diagnostics/tracing.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/diagnostics/tracing.spec.ts @@ -5,7 +5,7 @@ import { MockTracingSpan, assert, createMockTracingContext, -} from "@azure/test-utils"; +} from "@azure-tools/test-utils"; import { TRACEPARENT_PROPERTY, instrumentEventData, diff --git a/sdk/eventhub/event-hubs/test/internal/node/client.spec.ts b/sdk/eventhub/event-hubs/test/internal/node/client.spec.ts index 51475efb3609..4c24e21200f1 100644 --- a/sdk/eventhub/event-hubs/test/internal/node/client.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/node/client.spec.ts @@ -4,7 +4,7 @@ import { EnvVarKeys, getEnvVars } from "../../public/utils/testUtils"; import { EnvironmentCredential, TokenCredential } from "@azure/identity"; import { EventHubConsumerClient, EventHubProducerClient } from "../../../src"; -import { assert, should as shouldFn } from "@azure/test-utils"; +import { assert, should as shouldFn } from "@azure-tools/test-utils"; import Sinon from "sinon"; import { createMockServer } from "../../public/utils/mockService"; diff --git a/sdk/eventhub/event-hubs/test/internal/node/waitForEvents.spec.ts b/sdk/eventhub/event-hubs/test/internal/node/waitForEvents.spec.ts index 70ee0051d352..9ff0baa67551 100644 --- a/sdk/eventhub/event-hubs/test/internal/node/waitForEvents.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/node/waitForEvents.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import * as sinon from "sinon"; import EventEmitter from "events"; import { waitForEvents } from "../../../src/partitionReceiver"; diff --git a/sdk/eventhub/event-hubs/test/internal/partitionPump.spec.ts b/sdk/eventhub/event-hubs/test/internal/partitionPump.spec.ts index b49b3eda4ecb..fc7ba1fcc3ec 100644 --- a/sdk/eventhub/event-hubs/test/internal/partitionPump.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/partitionPump.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { testWithServiceTypes } from "../public/utils/testWithServiceTypes"; import { toProcessingSpanOptions } from "../../src/partitionPump"; import Sinon from "sinon"; diff --git a/sdk/eventhub/event-hubs/test/internal/sender.spec.ts b/sdk/eventhub/event-hubs/test/internal/sender.spec.ts index c0589e76cddb..76f33239755d 100644 --- a/sdk/eventhub/event-hubs/test/internal/sender.spec.ts +++ b/sdk/eventhub/event-hubs/test/internal/sender.spec.ts @@ -10,7 +10,7 @@ import { ReceivedEventData, SendBatchOptions, } from "../../src"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { SubscriptionHandlerForTests } from "../public/utils/subscriptionHandlerForTests"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; diff --git a/sdk/eventhub/event-hubs/test/public/hubruntime.spec.ts b/sdk/eventhub/event-hubs/test/public/hubruntime.spec.ts index 2f9da60fdc17..4144a7cb9b3d 100644 --- a/sdk/eventhub/event-hubs/test/public/hubruntime.spec.ts +++ b/sdk/eventhub/event-hubs/test/public/hubruntime.spec.ts @@ -8,7 +8,7 @@ import { EventHubProducerClient, MessagingError, } from "../../src"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import { createMockServer } from "./utils/mockService"; diff --git a/sdk/eventhub/event-hubs/test/public/node/client.spec.ts b/sdk/eventhub/event-hubs/test/public/node/client.spec.ts index ee2d89b30154..7d8a1a556333 100644 --- a/sdk/eventhub/event-hubs/test/public/node/client.spec.ts +++ b/sdk/eventhub/event-hubs/test/public/node/client.spec.ts @@ -4,7 +4,7 @@ import { EnvVarKeys, getEnvVars } from "../utils/testUtils"; import { EnvironmentCredential, TokenCredential } from "@azure/identity"; import { EventHubConsumerClient, EventHubProducerClient } from "../../../src"; -import { chai, should as shouldFn } from "@azure/test-utils"; +import { chai, should as shouldFn } from "@azure-tools/test-utils"; import chaiString from "chai-string"; import { createMockServer } from "../utils/mockService"; import { testWithServiceTypes } from "../utils/testWithServiceTypes"; diff --git a/sdk/eventhub/event-hubs/test/public/utils/testUtils.ts b/sdk/eventhub/event-hubs/test/public/utils/testUtils.ts index 930483556a01..f1a495165852 100644 --- a/sdk/eventhub/event-hubs/test/public/utils/testUtils.ts +++ b/sdk/eventhub/event-hubs/test/public/utils/testUtils.ts @@ -3,7 +3,7 @@ import { assertEnvironmentVariable, setEnvironmentVariables } from "@azure-tools/test-recorder"; import { EventHubConsumerClient, EventHubProducerClient, EventPosition } from "../../../src"; -import { TestTracer, resetTracer, setTracer } from "@azure/test-utils"; +import { TestTracer, resetTracer, setTracer } from "@azure-tools/test-utils"; import { delay } from "@azure/core-amqp"; import { loggerForTest } from "./logHelpers"; diff --git a/sdk/eventhub/event-hubs/test/public/utils/testWithServiceTypes.ts b/sdk/eventhub/event-hubs/test/public/utils/testWithServiceTypes.ts index 37ea9fbd1c32..015194ef5e71 100644 --- a/sdk/eventhub/event-hubs/test/public/utils/testWithServiceTypes.ts +++ b/sdk/eventhub/event-hubs/test/public/utils/testWithServiceTypes.ts @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TestFunctionWrapper, isNode, versionsToTest } from "@azure/test-utils"; +import { TestFunctionWrapper, versionsToTest } from "@azure-tools/test-utils"; import { getEnvVarValue } from "./testUtils"; import { Suite } from "mocha"; +import { isNodeLike } from "@azure/core-util"; export type SupportedTargets = "mock" | "live"; const serviceVersions: SupportedTargets[] = ["mock", "live"]; @@ -29,7 +30,7 @@ export function testWithServiceTypes( return; } - if (serviceVersion === "mock" && !isNode) { + if (serviceVersion === "mock" && !isNodeLike) { // We don't currently support running tests aginst the mock service in browsers. // This can be revisted once the mock service supports websockets. return; diff --git a/sdk/formrecognizer/ai-form-recognizer/package.json b/sdk/formrecognizer/ai-form-recognizer/package.json index f0248c6a4b85..a23850d342cb 100644 --- a/sdk/formrecognizer/ai-form-recognizer/package.json +++ b/sdk/formrecognizer/ai-form-recognizer/package.json @@ -93,7 +93,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/formrecognizer/ai-form-recognizer/test/private/poller.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/private/poller.spec.ts index 403f2da6677c..69fd962fda27 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/private/poller.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/private/poller.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { lro } from "../../src/lro/util/poller"; import { PollOperationState } from "@azure/core-lro"; import { AbortController, AbortError } from "@azure/abort-controller"; diff --git a/sdk/formrecognizer/ai-form-recognizer/test/private/tracing.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/private/tracing.spec.ts index 2d7561895766..b35b288084e2 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/private/tracing.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/private/tracing.spec.ts @@ -5,7 +5,7 @@ import { AzureKeyCredential } from "@azure/core-auth"; import { DocumentAnalysisClient } from "../../src/documentAnalysisClient"; import { DocumentModelAdministrationClient } from "../../src/documentModelAdministrationClient"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { HttpClient, PipelineRequest } from "@azure/core-rest-pipeline"; import { OperationTracingOptions } from "@azure/core-tracing"; import { CopyAuthorization } from "../../src/generated"; diff --git a/sdk/formrecognizer/ai-form-recognizer/test/public/node/analysis.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/public/node/analysis.spec.ts index ce29fb369843..1f12a6e3dacb 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/public/node/analysis.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/public/node/analysis.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { assert } from "chai"; import fs from "fs"; import { Context } from "mocha"; diff --git a/sdk/formrecognizer/ai-form-recognizer/test/public/node/classifiers.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/public/node/classifiers.spec.ts index 7b11d59d9221..4807a6c7bdca 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/public/node/classifiers.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/public/node/classifiers.spec.ts @@ -4,7 +4,7 @@ import { assert } from "chai"; import { Context } from "mocha"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; diff --git a/sdk/formrecognizer/ai-form-recognizer/test/public/training.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/public/training.spec.ts index f59ee1e00366..a2f57d867755 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/public/training.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/public/training.spec.ts @@ -4,7 +4,7 @@ import { assert } from "chai"; import { Context } from "mocha"; -import { getYieldedValue, matrix } from "@azure/test-utils"; +import { getYieldedValue, matrix } from "@azure-tools/test-utils"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; diff --git a/sdk/identity/identity-broker/package.json b/sdk/identity/identity-broker/package.json index ec96c7696460..5ba9a01258ed 100644 --- a/sdk/identity/identity-broker/package.json +++ b/sdk/identity/identity-broker/package.json @@ -70,7 +70,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/logger": "^1.0.4", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.35.1", "@types/mocha": "^10.0.0", diff --git a/sdk/identity/identity-broker/test/internal/node/interactiveBrowserCredential.spec.ts b/sdk/identity/identity-broker/test/internal/node/interactiveBrowserCredential.spec.ts index cbca7a589040..566d19d0dca9 100644 --- a/sdk/identity/identity-broker/test/internal/node/interactiveBrowserCredential.spec.ts +++ b/sdk/identity/identity-broker/test/internal/node/interactiveBrowserCredential.spec.ts @@ -13,8 +13,8 @@ import { PublicClientApplication } from "@azure/msal-node"; import Sinon from "sinon"; import { Recorder, isLiveMode, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { nativeBrokerPlugin } from "../../../src"; -import { isNode } from "@azure/core-util"; -import { assert } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; +import { assert } from "@azure-tools/test-utils"; import http from "http"; describe("InteractiveBrowserCredential (internal)", function (this: Mocha.Suite) { @@ -40,7 +40,7 @@ describe("InteractiveBrowserCredential (internal)", function (this: Mocha.Suite) await cleanup(); }); it("Throws error when no plugin is imported", async function (this: Mocha.Context) { - if (isNode) { + if (isNodeLike) { // OSX asks for passwords on CI, so we need to skip these tests from our automation if (process.platform !== "win32") { this.skip(); @@ -69,7 +69,7 @@ describe("InteractiveBrowserCredential (internal)", function (this: Mocha.Suite) } }); it("Accepts interactiveBrowserCredentialOptions", async function (this: Mocha.Context) { - if (isNode) { + if (isNodeLike) { // OSX asks for passwords on CI, so we need to skip these tests from our automation if (process.platform !== "win32") { this.skip(); diff --git a/sdk/identity/identity-cache-persistence/package.json b/sdk/identity/identity-cache-persistence/package.json index d42e5dae5edd..a9eb156f607f 100644 --- a/sdk/identity/identity-cache-persistence/package.json +++ b/sdk/identity/identity-cache-persistence/package.json @@ -71,7 +71,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/logger": "^1.0.4", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/jws": "^3.2.2", diff --git a/sdk/identity/identity-vscode/package.json b/sdk/identity/identity-vscode/package.json index 98450bce8c50..1a82fa7f68bc 100644 --- a/sdk/identity/identity-vscode/package.json +++ b/sdk/identity/identity-vscode/package.json @@ -67,7 +67,7 @@ "@azure/core-client": "^1.7.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/jws": "^3.2.2", diff --git a/sdk/identity/identity/package.json b/sdk/identity/identity/package.json index 71df15ca8731..bd8e37d89853 100644 --- a/sdk/identity/identity/package.json +++ b/sdk/identity/identity/package.json @@ -127,7 +127,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/keyvault-keys": "^4.2.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/jsonwebtoken": "^9.0.0", diff --git a/sdk/identity/identity/test/internal/node/azureCliCredential.spec.ts b/sdk/identity/identity/test/internal/node/azureCliCredential.spec.ts index 58b559db81bc..e65ff6971172 100644 --- a/sdk/identity/identity/test/internal/node/azureCliCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/azureCliCredential.spec.ts @@ -5,7 +5,7 @@ import Sinon, { createSandbox } from "sinon"; import { AzureCliCredential } from "../../../src/credentials/azureCliCredential"; import { GetTokenOptions } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import child_process from "child_process"; describe("AzureCliCredential (internal)", function () { diff --git a/sdk/identity/identity/test/internal/node/azureDeveloperCliCredential.spec.ts b/sdk/identity/identity/test/internal/node/azureDeveloperCliCredential.spec.ts index a8a97c52c11a..106ddfd0e1eb 100644 --- a/sdk/identity/identity/test/internal/node/azureDeveloperCliCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/azureDeveloperCliCredential.spec.ts @@ -4,7 +4,7 @@ import Sinon, { createSandbox } from "sinon"; import { AzureDeveloperCliCredential } from "../../../src/credentials/azureDeveloperCliCredential"; import { GetTokenOptions } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import child_process from "child_process"; describe("AzureDeveloperCliCredential (internal)", function () { diff --git a/sdk/identity/identity/test/internal/node/azurePowerShellCredential.spec.ts b/sdk/identity/identity/test/internal/node/azurePowerShellCredential.spec.ts index 47c88b6b8d16..b659005b3037 100644 --- a/sdk/identity/identity/test/internal/node/azurePowerShellCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/azurePowerShellCredential.spec.ts @@ -11,7 +11,7 @@ import { import { AzurePowerShellCredential } from "../../../src"; import { GetTokenOptions } from "@azure/core-auth"; import Sinon from "sinon"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { commandStack } from "../../../src/credentials/azurePowerShellCredential"; import { processUtils } from "../../../src/util/processUtils"; diff --git a/sdk/identity/identity/test/internal/node/msalClient.spec.ts b/sdk/identity/identity/test/internal/node/msalClient.spec.ts index ba9b50071c33..6435d9c4f83f 100644 --- a/sdk/identity/identity/test/internal/node/msalClient.spec.ts +++ b/sdk/identity/identity/test/internal/node/msalClient.spec.ts @@ -10,7 +10,7 @@ import { Recorder, env } from "@azure-tools/test-recorder"; import { AbortError } from "@azure/abort-controller"; import { AuthenticationRequiredError } from "../../../src/errors"; import { IdentityClient } from "../../../src/client/identityClient"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { credentialLogger } from "../../../src/util/logging"; import { msalPlugins } from "../../../src/msal/nodeFlows/msalPlugins"; import sinon from "sinon"; diff --git a/sdk/identity/identity/test/internal/node/msalPlugins.spec.ts b/sdk/identity/identity/test/internal/node/msalPlugins.spec.ts index a8dc539cc5e9..d1ea5cac43c1 100644 --- a/sdk/identity/identity/test/internal/node/msalPlugins.spec.ts +++ b/sdk/identity/identity/test/internal/node/msalPlugins.spec.ts @@ -11,7 +11,7 @@ import { import { MsalClientOptions } from "../../../src/msal/nodeFlows/msalClient"; import Sinon from "sinon"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("#generatePluginConfiguration", function () { let options: MsalClientOptions; diff --git a/sdk/identity/identity/test/internal/node/workloadIdentityCredential.spec.ts b/sdk/identity/identity/test/internal/node/workloadIdentityCredential.spec.ts index 8fbda5ff506c..0850d1372b55 100644 --- a/sdk/identity/identity/test/internal/node/workloadIdentityCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/workloadIdentityCredential.spec.ts @@ -14,7 +14,7 @@ import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup import { AuthenticationResult } from "@azure/msal-node"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { env } from "@azure-tools/test-recorder"; import path from "path"; import sinon from "sinon"; diff --git a/sdk/identity/identity/test/internal/tenantIdUtils.spec.ts b/sdk/identity/identity/test/internal/tenantIdUtils.spec.ts index 5810079efa40..2d0e6452fa70 100644 --- a/sdk/identity/identity/test/internal/tenantIdUtils.spec.ts +++ b/sdk/identity/identity/test/internal/tenantIdUtils.spec.ts @@ -7,7 +7,7 @@ import { resolveTenantId, } from "../../src/util/tenantIdUtils"; import { DeveloperSignOnClientId } from "../../src/constants"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { credentialLogger } from "../../src/util/logging"; describe("tenantIdUtils", () => { diff --git a/sdk/identity/identity/test/public/browser/usernamePasswordCredential.spec.ts b/sdk/identity/identity/test/public/browser/usernamePasswordCredential.spec.ts index 17115150e42d..968c0d0d10fd 100644 --- a/sdk/identity/identity/test/public/browser/usernamePasswordCredential.spec.ts +++ b/sdk/identity/identity/test/public/browser/usernamePasswordCredential.spec.ts @@ -6,7 +6,7 @@ import { IdentityTestContext } from "../../httpRequests"; import { UsernamePasswordCredential } from "../../../src"; import { assert } from "chai"; import { assertClientCredentials } from "../../authTestUtils"; -import { fakeTestPasswordPlaceholder } from "@azure/test-utils"; +import { fakeTestPasswordPlaceholder } from "@azure-tools/test-utils"; describe("UsernamePasswordCredential", function () { let testContext: IdentityTestContextInterface; diff --git a/sdk/identity/identity/test/public/node/authorityValidation.spec.ts b/sdk/identity/identity/test/public/node/authorityValidation.spec.ts index 848219e33fbc..82b646b1fa4a 100644 --- a/sdk/identity/identity/test/public/node/authorityValidation.spec.ts +++ b/sdk/identity/identity/test/public/node/authorityValidation.spec.ts @@ -5,7 +5,7 @@ import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup import { Recorder, env } from "@azure-tools/test-recorder"; import { ClientSecretCredential } from "../../../src"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("AuthorityValidation", function () { let cleanup: MsalTestCleanup; diff --git a/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts b/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts index 7f6efe6c5270..3de23285e93c 100644 --- a/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts @@ -4,7 +4,7 @@ import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth"; import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { getError } from "../../authTestUtils"; // TODO: Use the real one once we decide to re-enable this on the public API. diff --git a/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts b/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts index 3ab1217154b9..cb65b582d460 100644 --- a/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts @@ -12,7 +12,7 @@ import { AbortController } from "@azure/abort-controller"; import { ClientCertificateCredential } from "../../../src"; import { Context } from "mocha"; import { PipelineResponse } from "@azure/core-rest-pipeline"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import fs from "fs"; const ASSET_PATH = "assets"; diff --git a/sdk/identity/identity/test/public/node/clientSecretCredential.spec.ts b/sdk/identity/identity/test/public/node/clientSecretCredential.spec.ts index ec74c23be7e6..8ac654826671 100644 --- a/sdk/identity/identity/test/public/node/clientSecretCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/clientSecretCredential.spec.ts @@ -9,7 +9,7 @@ import { Recorder, delay, env, isRecordMode } from "@azure-tools/test-recorder"; import { AbortController } from "@azure/abort-controller"; import { ClientSecretCredential } from "../../../src"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("ClientSecretCredential", function () { let cleanup: MsalTestCleanup; diff --git a/sdk/identity/identity/test/public/node/deviceCodeCredential.spec.ts b/sdk/identity/identity/test/public/node/deviceCodeCredential.spec.ts index 622137e73ab0..11e611017a5f 100644 --- a/sdk/identity/identity/test/public/node/deviceCodeCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/deviceCodeCredential.spec.ts @@ -8,7 +8,7 @@ import { DeviceCodeCredential, DeviceCodePromptCallback } from "../../../src"; import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Recorder, delay, env, isLiveMode, isPlaybackMode } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; // https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9 const DeveloperSignOnClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"; diff --git a/sdk/identity/identity/test/public/node/environmentCredential.spec.ts b/sdk/identity/identity/test/public/node/environmentCredential.spec.ts index 545dafd1c872..966b0fef6299 100644 --- a/sdk/identity/identity/test/public/node/environmentCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/environmentCredential.spec.ts @@ -7,7 +7,7 @@ import { EnvironmentCredential, UsernamePasswordCredential } from "../../../src" import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Recorder, isLiveMode } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { getError } from "../../authTestUtils"; import sinon from "sinon"; diff --git a/sdk/identity/identity/test/public/node/multiTenantAuthentication.spec.ts b/sdk/identity/identity/test/public/node/multiTenantAuthentication.spec.ts index 9cbcea73bb9c..e6dfe2d569d6 100644 --- a/sdk/identity/identity/test/public/node/multiTenantAuthentication.spec.ts +++ b/sdk/identity/identity/test/public/node/multiTenantAuthentication.spec.ts @@ -4,11 +4,10 @@ import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Recorder, env } from "@azure-tools/test-recorder"; import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline"; - import { ClientSecretCredential } from "../../../src/credentials/clientSecretCredential"; import { Context } from "mocha"; import { IdentityClient } from "../../../src/client/identityClient"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("MultiTenantAuthentication", function () { let cleanup: MsalTestCleanup; diff --git a/sdk/identity/identity/test/public/node/tokenProvider.spec.ts b/sdk/identity/identity/test/public/node/tokenProvider.spec.ts index 75c6cfdc2255..4d94e591033a 100644 --- a/sdk/identity/identity/test/public/node/tokenProvider.spec.ts +++ b/sdk/identity/identity/test/public/node/tokenProvider.spec.ts @@ -5,7 +5,7 @@ import { EnvironmentCredential, getBearerTokenProvider } from "../../../src"; import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Recorder, delay, isPlaybackMode } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("getBearerTokenProvider", function () { let cleanup: MsalTestCleanup; diff --git a/sdk/identity/identity/test/public/node/usernamePasswordCredential.spec.ts b/sdk/identity/identity/test/public/node/usernamePasswordCredential.spec.ts index fd7256812104..37cdefec8894 100644 --- a/sdk/identity/identity/test/public/node/usernamePasswordCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/usernamePasswordCredential.spec.ts @@ -9,7 +9,7 @@ import { Recorder, delay, env, isLiveMode } from "@azure-tools/test-recorder"; import { AbortController } from "@azure/abort-controller"; import { Context } from "mocha"; import { UsernamePasswordCredential } from "../../../src"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; // https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9 const DeveloperSignOnClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"; diff --git a/sdk/identity/identity/test/public/node/workloadIdentityCredential.spec.ts b/sdk/identity/identity/test/public/node/workloadIdentityCredential.spec.ts index 844d4d8d79df..9dc3354af69e 100644 --- a/sdk/identity/identity/test/public/node/workloadIdentityCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/workloadIdentityCredential.spec.ts @@ -8,7 +8,7 @@ import { tmpdir } from "os"; import { MsalTestCleanup, msalNodeTestSetup } from "../../node/msalNodeTestSetup"; import { Recorder, env } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createJWTTokenFromCertificate } from "./utils/utils"; import { mkdtempSync, rmdirSync, unlinkSync, writeFileSync } from "fs"; import { diff --git a/sdk/keyvault/keyvault-admin/package.json b/sdk/keyvault/keyvault-admin/package.json index 1c168dd876ee..7379ce8c44d2 100644 --- a/sdk/keyvault/keyvault-admin/package.json +++ b/sdk/keyvault/keyvault-admin/package.json @@ -121,7 +121,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/keyvault-keys": "^4.2.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.11", diff --git a/sdk/keyvault/keyvault-admin/test/internal/serviceVersionParameter.spec.ts b/sdk/keyvault/keyvault-admin/test/internal/serviceVersionParameter.spec.ts index dd0369529027..53febb41283a 100644 --- a/sdk/keyvault/keyvault-admin/test/internal/serviceVersionParameter.spec.ts +++ b/sdk/keyvault/keyvault-admin/test/internal/serviceVersionParameter.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createSandbox, SinonSandbox, SinonSpy } from "sinon"; import { KeyVaultAccessControlClient, KeyVaultBackupClient } from "../../src"; import { LATEST_API_VERSION } from "../../src/constants"; diff --git a/sdk/keyvault/keyvault-admin/test/internal/userAgent.spec.ts b/sdk/keyvault/keyvault-admin/test/internal/userAgent.spec.ts index 5863fbf0748d..7ebdfa5f8f90 100644 --- a/sdk/keyvault/keyvault-admin/test/internal/userAgent.spec.ts +++ b/sdk/keyvault/keyvault-admin/test/internal/userAgent.spec.ts @@ -2,9 +2,8 @@ // Licensed under the MIT license. import { KeyVaultAccessControlClient, SDK_VERSION } from "../../src"; - import { TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Key Vault Admin's user agent", function () { it("SDK_VERSION and user-agent should match", async function () { diff --git a/sdk/keyvault/keyvault-admin/test/public/accessControlClient.spec.ts b/sdk/keyvault/keyvault-admin/test/public/accessControlClient.spec.ts index 642272a30d6d..1c0b35960a3e 100644 --- a/sdk/keyvault/keyvault-admin/test/public/accessControlClient.spec.ts +++ b/sdk/keyvault/keyvault-admin/test/public/accessControlClient.spec.ts @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; import { assertEnvironmentVariable, env, Recorder } from "@azure-tools/test-recorder"; -import { getYieldedValue } from "@azure/test-utils"; +import { assert, getYieldedValue } from "@azure-tools/test-utils"; import { KeyVaultAccessControlClient, @@ -47,7 +46,7 @@ describe("KeyVaultAccessControlClient", () => { it("can list role definitions", async function () { const expectedType = "Microsoft.Authorization/roleDefinitions"; - let receivedRoles: string[] = []; + const receivedRoles: string[] = []; for await (const roleDefinition of client.listRoleDefinitions(globalScope)) { // Each role definition will have the shape of: @@ -192,7 +191,7 @@ describe("KeyVaultAccessControlClient", () => { describe("role assignments", async function () { it("can list role assignments", async function () { const expectedType = "Microsoft.Authorization/roleAssignments"; - let receivedRoles: string[] = []; + const receivedRoles: string[] = []; for await (const roleAssignment of client.listRoleAssignments(globalScope)) { // Each role assignment will have the shape of: @@ -229,7 +228,7 @@ describe("KeyVaultAccessControlClient", () => { assert.fail(`Unable to find role definition with name ${roleName}`); } - let assignment = await client.createRoleAssignment( + const assignment = await client.createRoleAssignment( globalScope, assignmentName, roleDefinition.id, diff --git a/sdk/keyvault/keyvault-admin/test/public/backupClient.spec.ts b/sdk/keyvault/keyvault-admin/test/public/backupClient.spec.ts index 809cf0ac7a46..22e98f8be586 100644 --- a/sdk/keyvault/keyvault-admin/test/public/backupClient.spec.ts +++ b/sdk/keyvault/keyvault-admin/test/public/backupClient.spec.ts @@ -8,7 +8,7 @@ import { authenticate } from "./utils/authentication"; import { testPollerProperties } from "./utils/recorder"; import { getSasToken, getServiceVersion } from "./utils/common"; import { delay } from "@azure/core-util"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { KeyClient } from "@azure/keyvault-keys"; describe("KeyVaultBackupClient", () => { diff --git a/sdk/keyvault/keyvault-admin/test/public/settingsClient.spec.ts b/sdk/keyvault/keyvault-admin/test/public/settingsClient.spec.ts index e8fb0f71201b..93c8106fb98a 100644 --- a/sdk/keyvault/keyvault-admin/test/public/settingsClient.spec.ts +++ b/sdk/keyvault/keyvault-admin/test/public/settingsClient.spec.ts @@ -1,5 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { KeyVaultSettingsClient } from "../../src/settingsClient"; import { authenticate } from "./utils/authentication"; import { getServiceVersion, onVersions } from "./utils/common"; diff --git a/sdk/keyvault/keyvault-admin/test/public/utils/common.ts b/sdk/keyvault/keyvault-admin/test/public/utils/common.ts index aac0df0058d0..c3d18e2f98de 100644 --- a/sdk/keyvault/keyvault-admin/test/public/utils/common.ts +++ b/sdk/keyvault/keyvault-admin/test/public/utils/common.ts @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; import { env } from "@azure-tools/test-recorder"; -import { SupportedVersions, supports, TestFunctionWrapper } from "@azure/test-utils"; +import { assert, SupportedVersions, supports, TestFunctionWrapper } from "@azure-tools/test-utils"; import { LATEST_API_VERSION, SUPPORTED_API_VERSIONS } from "../../../src/constants"; export async function assertThrowsAbortError(cb: () => Promise): Promise { @@ -38,9 +37,9 @@ export function getFolderName(uri: string): string { /** * Safely get an environment variable by name, throwing an error if it doesn't exist. - * @param envVarName The name of the environment variable to return + * @param envVarName - The name of the environment variable to return */ -export function getEnvironmentVariable(envVarName: string) { +export function getEnvironmentVariable(envVarName: string): string { const envVar = env[envVarName]; if (!envVar) { throw new Error(`Missing required environment variable ${envVarName}`); @@ -51,7 +50,7 @@ export function getEnvironmentVariable(envVarName: string) { /** * Get a predefined SAS token and Storage URI to use when backing up a KeyVault */ -export function getSasToken() { +export function getSasToken(): { blobStorageUri: string, blobSasToken: string } { const baseStorageUri = getEnvironmentVariable("BLOB_STORAGE_URI").replace(/\/$/, ""); const blobStorageUri = `${baseStorageUri}/${getEnvironmentVariable("BLOB_CONTAINER_NAME")}`; const blobSasToken = getEnvironmentVariable("BLOB_STORAGE_SAS_TOKEN"); diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index dbe6f6b7314a..05cbe635f370 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -121,7 +121,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/keyvault-secrets": "^4.5.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/keyvault/keyvault-certificates/test/internal/lroUnexpectedErrors.spec.ts b/sdk/keyvault/keyvault-certificates/test/internal/lroUnexpectedErrors.spec.ts index c23ee5644a96..51591155eaee 100644 --- a/sdk/keyvault/keyvault-certificates/test/internal/lroUnexpectedErrors.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/internal/lroUnexpectedErrors.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { RestError, createHttpHeaders, PipelineRequest } from "@azure/core-rest-pipeline"; import { DeleteCertificatePoller } from "../../src/lro/delete/poller"; import { RecoverDeletedCertificatePoller } from "../../src/lro/recover/poller"; diff --git a/sdk/keyvault/keyvault-certificates/test/internal/serviceVersionParameter.spec.ts b/sdk/keyvault/keyvault-certificates/test/internal/serviceVersionParameter.spec.ts index d9ae0de99d11..bdeeeeae9644 100644 --- a/sdk/keyvault/keyvault-certificates/test/internal/serviceVersionParameter.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/internal/serviceVersionParameter.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createSandbox, SinonSandbox, SinonSpy } from "sinon"; import { CertificateClient } from "../../src"; import { LATEST_API_VERSION } from "../../src/certificatesModels"; diff --git a/sdk/keyvault/keyvault-certificates/test/internal/transformations.spec.ts b/sdk/keyvault/keyvault-certificates/test/internal/transformations.spec.ts index acf9e0a91ce9..e548386d5505 100644 --- a/sdk/keyvault/keyvault-certificates/test/internal/transformations.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/internal/transformations.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { CertificateBundle, CertificateOperation as CoreCertificateOperation, diff --git a/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts b/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts index 915431c8ce8e..cd51c89d4b38 100644 --- a/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/internal/userAgent.spec.ts @@ -4,7 +4,7 @@ import { CertificateClient } from "../../src"; import { SDK_VERSION } from "../../src/constants"; import { TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Certificates client's user agent (only in Node, because of fs)", () => { it("SDK_VERSION and user-agent should match", async function () { diff --git a/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts index c1353591b73c..335496a0f3b0 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/CRUD.spec.ts @@ -5,7 +5,7 @@ import os from "os"; import { Context } from "mocha"; import fs from "fs"; import childProcess from "child_process"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { env, isLiveMode, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import { AbortController } from "@azure/abort-controller"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/identifier.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/identifier.spec.ts index 343220cdb027..5291393b2208 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/identifier.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/identifier.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { parseKeyVaultCertificateIdentifier } from "../../src/identifier"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Key Vault Certificates Identifier", () => { it("It should work with a URI of a certificate before it gets a version", async function () { diff --git a/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts index ecd88f764b65..ce3f5b11f9f6 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/list.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { env, Recorder, isRecordMode } from "@azure-tools/test-recorder"; import { CertificateClient } from "../../src"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts index a101b045e08c..437357e1dd71 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.create.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { PollerStoppedError } from "@azure/core-lro"; import { env, Recorder } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts index d17e2030d7d8..2abcd99c4267 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.delete.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { PollerStoppedError } from "@azure/core-lro"; import { env, Recorder } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts index bf816e0a8345..cdd89d96159c 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.operation.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { env, Recorder } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts index f8d3d434ba04..10e355573af4 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/lro.recover.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { env, Recorder } from "@azure-tools/test-recorder"; import { PollerStoppedError } from "@azure/core-lro"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts b/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts index 1104aeb11b59..facffa949124 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/recoverBackupRestore.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { env, isPlaybackMode, Recorder, isRecordMode } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-certificates/test/public/utils/common.ts b/sdk/keyvault/keyvault-certificates/test/public/utils/common.ts index 35e129d1a516..9ea83bab18f0 100644 --- a/sdk/keyvault/keyvault-certificates/test/public/utils/common.ts +++ b/sdk/keyvault/keyvault-certificates/test/public/utils/common.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { env } from "@azure-tools/test-recorder"; -import { SupportedVersions, supports, TestFunctionWrapper } from "@azure/test-utils"; +import { SupportedVersions, supports, TestFunctionWrapper } from "@azure-tools/test-utils"; import { CertificateClientOptions } from "../../../src"; export function getKeyvaultName(): string { diff --git a/sdk/keyvault/keyvault-common/package.json b/sdk/keyvault/keyvault-common/package.json index 7208023eaac7..04ea0edebb99 100644 --- a/sdk/keyvault/keyvault-common/package.json +++ b/sdk/keyvault/keyvault-common/package.json @@ -63,7 +63,7 @@ }, "devDependencies": { "@azure/dev-tool": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "eslint": "^8.0.0", diff --git a/sdk/keyvault/keyvault-common/test/internal/challengeAuthenticationCallbacks.spec.ts b/sdk/keyvault/keyvault-common/test/internal/challengeAuthenticationCallbacks.spec.ts index d87c2c282cda..47c39f545cbc 100644 --- a/sdk/keyvault/keyvault-common/test/internal/challengeAuthenticationCallbacks.spec.ts +++ b/sdk/keyvault/keyvault-common/test/internal/challengeAuthenticationCallbacks.spec.ts @@ -8,7 +8,7 @@ import { createHttpHeaders, createPipelineRequest, } from "@azure/core-rest-pipeline"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createKeyVaultChallengeCallbacks } from "../../src"; import { parseWWWAuthenticateHeader } from "../../src/parseWWWAuthenticate"; diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index 011b773ccb16..6498a8ce9ec6 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -118,7 +118,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/keyvault/keyvault-keys/test/internal/aesCryptography.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/aesCryptography.spec.ts index ef90e8c3e761..302a36068352 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/aesCryptography.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/aesCryptography.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { AesCbcEncryptionAlgorithm, diff --git a/sdk/keyvault/keyvault-keys/test/internal/crypto.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/crypto.spec.ts index be4600e3d50e..ab21e98a94a0 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/crypto.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/crypto.spec.ts @@ -5,7 +5,7 @@ import { OperationOptions } from "@azure/core-client"; import { isNode } from "@azure/core-util"; import { TokenCredential } from "@azure/core-auth"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import sinon from "sinon"; import { CryptographyClient, diff --git a/sdk/keyvault/keyvault-keys/test/internal/lroUnexpectedErrors.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/lroUnexpectedErrors.spec.ts index 71aa311ebf87..bb769a6f0ad4 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/lroUnexpectedErrors.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/lroUnexpectedErrors.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { RestError } from "@azure/core-rest-pipeline"; import { DeleteKeyPoller } from "../../src/lro/delete/poller"; import { RecoverDeletedKeyPoller } from "../../src/lro/recover/poller"; diff --git a/sdk/keyvault/keyvault-keys/test/internal/recoverBackupRestore.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/recoverBackupRestore.spec.ts index e3940d10b484..efe0ceb2cb87 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/recoverBackupRestore.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/recoverBackupRestore.spec.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; -import { isNode } from "@azure/core-util"; +import { isNodeLike } from "@azure/core-util"; import { KeyClient } from "../../src"; import { getServiceVersion } from "../public/utils/common"; import { testPollerProperties } from "../public/utils/recorderUtils"; @@ -74,7 +74,7 @@ describe("Keys client - restore keys and recover backups", () => { const keyName = testClient.formatName(`${keyPrefix}-${this!.test!.title}-${keySuffix}`); await client.createKey(keyName, "RSA"); const result = await client.backupKey(keyName); - if (isNode) { + if (isNodeLike) { assert.equal(Buffer.isBuffer(result), true, "Unexpected return value from backupKey()"); } else { assert.equal(result!.constructor, Uint8Array, "Unexpected return value from backupKey()"); diff --git a/sdk/keyvault/keyvault-keys/test/internal/serviceVersionParameter.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/serviceVersionParameter.spec.ts index f292f1edfc1c..909c63628d4c 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/serviceVersionParameter.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/serviceVersionParameter.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { SinonSandbox, SinonSpy, createSandbox } from "sinon"; import { KeyClient } from "../../src"; import { LATEST_API_VERSION } from "../../src/keysModels"; @@ -12,7 +12,7 @@ import { createHttpHeaders, } from "@azure/core-rest-pipeline"; import { ClientSecretCredential } from "@azure/identity"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { serviceVersions } from "../public/utils/common"; describe("The Keys client should set the serviceVersion", () => { diff --git a/sdk/keyvault/keyvault-keys/test/internal/transformations.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/transformations.spec.ts index d4c8c4e569b4..9853d00f0564 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/transformations.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/transformations.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { DeletedKeyBundle, DeletedKeyItem, diff --git a/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts b/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts index b135674e66cc..5006286f6bbd 100644 --- a/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/internal/userAgent.spec.ts @@ -4,7 +4,7 @@ import { KeyClient } from "../../src"; import { SDK_VERSION } from "../../src/constants"; import { TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Keys client's user agent", () => { it("SDK_VERSION and user-agent should match", async function () { diff --git a/sdk/keyvault/keyvault-keys/test/public/crypto.hsm.spec.ts b/sdk/keyvault/keyvault-keys/test/public/crypto.hsm.spec.ts index b2d095adb6f6..aaf4d1326d84 100644 --- a/sdk/keyvault/keyvault-keys/test/public/crypto.hsm.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/crypto.hsm.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { isLiveMode, Recorder } from "@azure-tools/test-recorder"; import { ClientSecretCredential } from "@azure/identity"; diff --git a/sdk/keyvault/keyvault-keys/test/public/identifier.spec.ts b/sdk/keyvault/keyvault-keys/test/public/identifier.spec.ts index 2f17ec42268e..07568825c590 100644 --- a/sdk/keyvault/keyvault-keys/test/public/identifier.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/identifier.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { parseKeyVaultKeyIdentifier } from "../../src/identifier"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Key Vault Keys Identifier", () => { it("It should work with a URI of a key before it gets a version", async function () { diff --git a/sdk/keyvault/keyvault-keys/test/public/import.spec.ts b/sdk/keyvault/keyvault-keys/test/public/import.spec.ts index 48499d997785..2fc50a068e60 100644 --- a/sdk/keyvault/keyvault-keys/test/public/import.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/import.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-keys/test/public/keyClient.hsm.spec.ts b/sdk/keyvault/keyvault-keys/test/public/keyClient.hsm.spec.ts index b325b78397c6..de64d90c901a 100644 --- a/sdk/keyvault/keyvault-keys/test/public/keyClient.hsm.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/keyClient.hsm.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { KeyClient } from "../../src"; diff --git a/sdk/keyvault/keyvault-keys/test/public/keyClient.spec.ts b/sdk/keyvault/keyvault-keys/test/public/keyClient.spec.ts index 4a3b2cd077fa..9d3806932bbf 100644 --- a/sdk/keyvault/keyvault-keys/test/public/keyClient.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/keyClient.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env, isPlaybackMode, isRecordMode } from "@azure-tools/test-recorder"; import { createDefaultHttpClient, createPipelineRequest } from "@azure/core-rest-pipeline"; diff --git a/sdk/keyvault/keyvault-keys/test/public/list.spec.ts b/sdk/keyvault/keyvault-keys/test/public/list.spec.ts index dad4405e62bf..c21090448fc9 100644 --- a/sdk/keyvault/keyvault-keys/test/public/list.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/list.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env, isRecordMode } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts b/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts index d6439f2cfd44..619c582e65b3 100644 --- a/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts b/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts index 8f32b0f9f13b..9fa6076ed212 100644 --- a/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-keys/test/public/node/crypto.spec.ts b/sdk/keyvault/keyvault-keys/test/public/node/crypto.spec.ts index 6983beb8b6e6..f4e6a8c6dd01 100644 --- a/sdk/keyvault/keyvault-keys/test/public/node/crypto.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/node/crypto.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createHash } from "crypto"; import { Recorder, env, isLiveMode } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-keys/test/public/node/localCryptography.spec.ts b/sdk/keyvault/keyvault-keys/test/public/node/localCryptography.spec.ts index 8a4450bbb908..9cfeccdaf5db 100644 --- a/sdk/keyvault/keyvault-keys/test/public/node/localCryptography.spec.ts +++ b/sdk/keyvault/keyvault-keys/test/public/node/localCryptography.spec.ts @@ -10,7 +10,7 @@ import { Recorder, env, isLiveMode } from "@azure-tools/test-recorder"; import { ClientSecretCredential } from "@azure/identity"; import { RsaCryptographyProvider } from "../../../src/cryptography/rsaCryptographyProvider"; import { getServiceVersion } from "../utils/common"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Local cryptography public tests", () => { const keyPrefix = `localCrypto${env.KEY_NAME || "KeyName"}`; diff --git a/sdk/keyvault/keyvault-keys/test/public/utils/common.ts b/sdk/keyvault/keyvault-keys/test/public/utils/common.ts index c2221500b42d..d6d50bdfe5aa 100644 --- a/sdk/keyvault/keyvault-keys/test/public/utils/common.ts +++ b/sdk/keyvault/keyvault-keys/test/public/utils/common.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { SupportedVersions, TestFunctionWrapper, supports } from "@azure/test-utils"; +import { SupportedVersions, TestFunctionWrapper, supports } from "@azure-tools/test-utils"; import { env } from "@azure-tools/test-recorder"; /** diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index 91e13c73271c..40680cb72752 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -116,7 +116,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/keyvault/keyvault-secrets/test/internal/lroUnexpectedErrors.spec.ts b/sdk/keyvault/keyvault-secrets/test/internal/lroUnexpectedErrors.spec.ts index a9d9c466b516..df4db326343b 100644 --- a/sdk/keyvault/keyvault-secrets/test/internal/lroUnexpectedErrors.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/internal/lroUnexpectedErrors.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { RestError } from "@azure/core-rest-pipeline"; import { DeleteSecretPoller } from "../../src/lro/delete/poller"; import { RecoverDeletedSecretPoller } from "../../src/lro/recover/poller"; diff --git a/sdk/keyvault/keyvault-secrets/test/internal/serviceVersionParameter.spec.ts b/sdk/keyvault/keyvault-secrets/test/internal/serviceVersionParameter.spec.ts index 675b261c973a..1755707f3301 100644 --- a/sdk/keyvault/keyvault-secrets/test/internal/serviceVersionParameter.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/internal/serviceVersionParameter.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { SinonSandbox, SinonSpy, createSandbox } from "sinon"; import { SecretClient } from "../../src"; import { LATEST_API_VERSION } from "../../src/secretsModels"; diff --git a/sdk/keyvault/keyvault-secrets/test/internal/transformations.spec.ts b/sdk/keyvault/keyvault-secrets/test/internal/transformations.spec.ts index cc6e1877d0b0..9bc63da58c17 100644 --- a/sdk/keyvault/keyvault-secrets/test/internal/transformations.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/internal/transformations.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { DeletedSecret, KeyVaultSecret } from "../../src"; import { DeletedSecretBundle, SecretBundle } from "../../src/generated"; import { getSecretFromSecretBundle } from "../../src/transformations"; diff --git a/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts b/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts index ce9b1fa57bb2..4297197bd39e 100644 --- a/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/internal/userAgent.spec.ts @@ -4,7 +4,7 @@ import { SDK_VERSION } from "../../src/constants"; import { SecretClient } from "../../src"; import { TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Secrets client's user agent (only in Node, because of fs)", () => { it("SDK_VERSION and user-agent should match", async function () { diff --git a/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts index 7cfa9485d346..8636940a724b 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Recorder, env } from "@azure-tools/test-recorder"; import { AbortController } from "@azure/abort-controller"; diff --git a/sdk/keyvault/keyvault-secrets/test/public/identifier.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/identifier.spec.ts index 3aaee4b94447..e9a6ce0e1b86 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/identifier.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/identifier.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { parseKeyVaultSecretIdentifier } from "../../src/identifier"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Key Vault Secrets Identifier", () => { it("It should work with a URI of a secret before it gets a version", async function () { diff --git a/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts index 0bc2aa6a661d..5ebb9582da4b 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/list.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env, isRecordMode, isLiveMode } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts index c62064278d68..5603cb666efa 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env } from "@azure-tools/test-recorder"; import { PollerStoppedError } from "@azure/core-lro"; diff --git a/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts index af56f15ece45..20be9c9e808c 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { Recorder, env } from "@azure-tools/test-recorder"; import { PollerStoppedError } from "@azure/core-lro"; diff --git a/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts b/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts index 7fa870af2cc5..960db8f735e5 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { isNode } from "@azure/core-util"; import { Recorder, env, isPlaybackMode, isRecordMode } from "@azure-tools/test-recorder"; diff --git a/sdk/keyvault/keyvault-secrets/test/public/utils/common.ts b/sdk/keyvault/keyvault-secrets/test/public/utils/common.ts index ffbe1ac69ae7..e79dbfb4ff1e 100644 --- a/sdk/keyvault/keyvault-secrets/test/public/utils/common.ts +++ b/sdk/keyvault/keyvault-secrets/test/public/utils/common.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; -import { SupportedVersions, TestFunctionWrapper, supports } from "@azure/test-utils"; +import { SupportedVersions, TestFunctionWrapper, assert, supports } from "@azure-tools/test-utils"; import { env } from "@azure-tools/test-recorder"; import { SecretClientOptions } from "../../../src"; diff --git a/sdk/maps/maps-common/package.json b/sdk/maps/maps-common/package.json index 0dc343796a32..2b71bc16f6fe 100644 --- a/sdk/maps/maps-common/package.json +++ b/sdk/maps/maps-common/package.json @@ -69,7 +69,7 @@ "@azure/core-client": "^1.0.0" }, "devDependencies": { - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/dev-tool": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/maps/maps-geolocation-rest/package.json b/sdk/maps/maps-geolocation-rest/package.json index 498255a40c0e..5dd310018d65 100644 --- a/sdk/maps/maps-geolocation-rest/package.json +++ b/sdk/maps/maps-geolocation-rest/package.json @@ -81,6 +81,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure/identity": "^4.0.1", + "@azure/core-util": "^1.9.0", "@azure-tools/test-recorder": "^3.0.0", "mocha": "^10.0.0", "@types/mocha": "^10.0.0", @@ -98,7 +99,7 @@ "karma-sourcemap-loader": "^0.3.8", "karma": "^6.2.0", "nyc": "^15.1.0", - "@azure/test-utils": "~1.0.0", + "@azure-tools/test-utils": "~1.0.0", "ts-node": "^10.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-geolocation-rest/README.md", diff --git a/sdk/maps/maps-geolocation-rest/test/public/MapsGeolocation.spec.ts b/sdk/maps/maps-geolocation-rest/test/public/MapsGeolocation.spec.ts index cc02a9efd279..46dbd4e02246 100644 --- a/sdk/maps/maps-geolocation-rest/test/public/MapsGeolocation.spec.ts +++ b/sdk/maps/maps-geolocation-rest/test/public/MapsGeolocation.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder, env } from "@azure-tools/test-recorder"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { createTestCredential } from "@azure-tools/test-credential"; import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; @@ -36,7 +36,7 @@ describe("Authentication", function () { * Skip this test in browser because we have to use InteractiveBrowserCredential in the browser. * But it requires user's interaction, which is not testable in karma. * */ - if (!isNode) this.skip(); + if (!isNodeLike) this.skip(); /** * Use createTestCredential() instead of new DefaultAzureCredential(), else the playback mode won't work * Reference: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/test-quickstart.md#azuread-oauth2-authentication diff --git a/sdk/maps/maps-render-rest/package.json b/sdk/maps/maps-render-rest/package.json index 5c62239e392c..d0993ac7b992 100644 --- a/sdk/maps/maps-render-rest/package.json +++ b/sdk/maps/maps-render-rest/package.json @@ -68,7 +68,7 @@ "tslib": "^2.2.0" }, "devDependencies": { - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "autorest": "latest", "@types/node": "^18.0.0", @@ -82,6 +82,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure/identity": "^4.0.1", + "@azure/core-util": "^1.9.0", "@azure-tools/test-recorder": "^3.0.0", "mocha": "^10.0.0", "@types/mocha": "^10.0.0", diff --git a/sdk/maps/maps-render-rest/test/public/mapsRender.spec.ts b/sdk/maps/maps-render-rest/test/public/mapsRender.spec.ts index 2606ed0fdbf7..f8c562fa8be4 100644 --- a/sdk/maps/maps-render-rest/test/public/mapsRender.spec.ts +++ b/sdk/maps/maps-render-rest/test/public/mapsRender.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder, env } from "@azure-tools/test-recorder"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { createTestCredential } from "@azure-tools/test-credential"; import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; @@ -34,7 +34,7 @@ describe("Authentication", function () { * Skip this test in browser because we have to use InteractiveBrowserCredential in the browser. * But it requires user's interaction, which is not testable in karma. * */ - if (!isNode) this.skip(); + if (!isNodeLike) this.skip(); /** * Use createTestCredential() instead of new DefaultAzureCredential(), else the playback mode won't work * Reference: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/test-quickstart.md#azuread-oauth2-authentication diff --git a/sdk/maps/maps-search-rest/package.json b/sdk/maps/maps-search-rest/package.json index a7d45217c9fd..719d90725814 100644 --- a/sdk/maps/maps-search-rest/package.json +++ b/sdk/maps/maps-search-rest/package.json @@ -83,6 +83,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure/identity": "^4.0.1", + "@azure/core-util": "^1.9.0", "@azure-tools/test-recorder": "^3.0.0", "mocha": "^10.0.0", "@types/mocha": "^10.0.0", @@ -100,7 +101,7 @@ "karma-sourcemap-loader": "^0.3.8", "karma": "^6.2.0", "nyc": "^15.1.0", - "@azure/test-utils": "~1.0.0", + "@azure-tools/test-utils": "~1.0.0", "ts-node": "^10.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/maps/maps-search-rest/README.md", diff --git a/sdk/maps/maps-search-rest/test/public/MapsSearch.spec.ts b/sdk/maps/maps-search-rest/test/public/MapsSearch.spec.ts index dee5d7c28bc4..25da763e6393 100644 --- a/sdk/maps/maps-search-rest/test/public/MapsSearch.spec.ts +++ b/sdk/maps/maps-search-rest/test/public/MapsSearch.spec.ts @@ -3,7 +3,7 @@ import { Context } from "mocha"; import { env, Recorder } from "@azure-tools/test-recorder"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { createTestCredential } from "@azure-tools/test-credential"; import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; @@ -34,7 +34,7 @@ describe("Authentication", function () { * Skip this test in browser because we have to use InteractiveBrowserCredential in the browser. * But it requires user's interaction, which is not testable in karma. * */ - if (!isNode) this.skip(); + if (!isNodeLike) this.skip(); /** * Use createTestCredential() instead of new DefaultAzureCredential(), else the playback mode won't work * Reference: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/test-quickstart.md#azuread-oauth2-authentication diff --git a/sdk/metricsadvisor/ai-metrics-advisor/package.json b/sdk/metricsadvisor/ai-metrics-advisor/package.json index fab69e4ce297..e2688e62d887 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/package.json +++ b/sdk/metricsadvisor/ai-metrics-advisor/package.json @@ -97,7 +97,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/metricsadvisor/ai-metrics-advisor/test/public/adminclient.spec.ts b/sdk/metricsadvisor/ai-metrics-advisor/test/public/adminclient.spec.ts index c416cad5b9cf..1aaec80c3140 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/test/public/adminclient.spec.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/test/public/adminclient.spec.ts @@ -16,7 +16,7 @@ import { makeCredential, } from "./util/recordedClients"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; -import { getYieldedValue, matrix } from "@azure/test-utils"; +import { getYieldedValue, matrix } from "@azure-tools/test-utils"; matrix([[true, false]] as const, async (useAad) => { describe(`[${useAad ? "AAD" : "API Key"}]`, () => { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/test/public/advisorclient.spec.ts b/sdk/metricsadvisor/ai-metrics-advisor/test/public/advisorclient.spec.ts index 0088386f1f3b..9825e1f0b214 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/test/public/advisorclient.spec.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/test/public/advisorclient.spec.ts @@ -13,7 +13,7 @@ import { } from "../../src"; import { createRecordedAdvisorClient, makeCredential } from "./util/recordedClients"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; -import { getYieldedValue, matrix } from "@azure/test-utils"; +import { getYieldedValue, matrix } from "@azure-tools/test-utils"; matrix([[true, false]] as const, async (useAad) => { describe(`[${useAad ? "AAD" : "API Key"}]`, () => { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/test/public/dataSourceCred.spec.ts b/sdk/metricsadvisor/ai-metrics-advisor/test/public/dataSourceCred.spec.ts index 0a5e1d00fa4d..646fe77e7fdb 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/test/public/dataSourceCred.spec.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/test/public/dataSourceCred.spec.ts @@ -20,7 +20,7 @@ import { makeCredential, } from "./util/recordedClients"; import { Recorder } from "@azure-tools/test-recorder"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; describe("DataSourceCredential", () => { let client: MetricsAdvisorAdministrationClient; diff --git a/sdk/metricsadvisor/ai-metrics-advisor/test/public/datafeed.spec.ts b/sdk/metricsadvisor/ai-metrics-advisor/test/public/datafeed.spec.ts index fce6e2014bad..9b40509fd584 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/test/public/datafeed.spec.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/test/public/datafeed.spec.ts @@ -28,7 +28,7 @@ import { makeCredential, } from "./util/recordedClients"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; -import { fakeTestSecretPlaceholder, getYieldedValue, matrix } from "@azure/test-utils"; +import { fakeTestSecretPlaceholder, getYieldedValue, matrix } from "@azure-tools/test-utils"; matrix([[true, false]] as const, async (useAad) => { describe(`[${useAad ? "AAD" : "API Key"}]`, () => { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/test/public/hookTests.spec.ts b/sdk/metricsadvisor/ai-metrics-advisor/test/public/hookTests.spec.ts index c19d63294816..f070bc784bab 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/test/public/hookTests.spec.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/test/public/hookTests.spec.ts @@ -22,7 +22,7 @@ import { fakeTestSecretPlaceholder, getYieldedValue, matrix, -} from "@azure/test-utils"; +} from "@azure-tools/test-utils"; matrix([[true, false]] as const, async (useAad) => { describe(`[${useAad ? "AAD" : "API Key"}]`, () => { diff --git a/sdk/mixedreality/mixed-reality-authentication/package.json b/sdk/mixedreality/mixed-reality-authentication/package.json index 944e351f80c9..c557965d0e0e 100644 --- a/sdk/mixedreality/mixed-reality-authentication/package.json +++ b/sdk/mixedreality/mixed-reality-authentication/package.json @@ -71,7 +71,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/monitor/monitor-ingestion/package.json b/sdk/monitor/monitor-ingestion/package.json index c31a65380f49..f0bba8afaa54 100644 --- a/sdk/monitor/monitor-ingestion/package.json +++ b/sdk/monitor/monitor-ingestion/package.json @@ -98,7 +98,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/monitor-query": "^1.2.0-beta.3", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/monitor/monitor-opentelemetry/package.json b/sdk/monitor/monitor-opentelemetry/package.json index ccee91cb1f5e..717a95a68f78 100644 --- a/sdk/monitor/monitor-opentelemetry/package.json +++ b/sdk/monitor/monitor-opentelemetry/package.json @@ -64,7 +64,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", diff --git a/sdk/monitor/monitor-query/package.json b/sdk/monitor/monitor-query/package.json index 93d08ca5ba6a..5aff9948cec7 100644 --- a/sdk/monitor/monitor-query/package.json +++ b/sdk/monitor/monitor-query/package.json @@ -102,7 +102,7 @@ "@azure/abort-controller": "^1.0.0", "@azure/identity": "^4.0.1", "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.22", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/monitor/monitor-query/test/internal/unit/logQueryOptionUtils.spec.ts b/sdk/monitor/monitor-query/test/internal/unit/logQueryOptionUtils.spec.ts index d42606d9ef1d..8d4b8cedc722 100644 --- a/sdk/monitor/monitor-query/test/internal/unit/logQueryOptionUtils.spec.ts +++ b/sdk/monitor/monitor-query/test/internal/unit/logQueryOptionUtils.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { getLogQueryEndpoint } from "../../../src/internal/logQueryOptionUtils"; describe("logQueryOptionsUtils", () => { diff --git a/sdk/monitor/monitor-query/test/internal/unit/logsQueryClient.unittest.spec.ts b/sdk/monitor/monitor-query/test/internal/unit/logsQueryClient.unittest.spec.ts index 3ebcf8254b3f..69663441f744 100644 --- a/sdk/monitor/monitor-query/test/internal/unit/logsQueryClient.unittest.spec.ts +++ b/sdk/monitor/monitor-query/test/internal/unit/logsQueryClient.unittest.spec.ts @@ -3,7 +3,7 @@ import { Durations, LogsQueryClient } from "../../../src"; import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("LogsQueryClient unit tests", () => { /** diff --git a/sdk/monitor/monitor-query/test/internal/unit/metricsQueryClient.unittest.spec.ts b/sdk/monitor/monitor-query/test/internal/unit/metricsQueryClient.unittest.spec.ts index 72cc0a47a5b6..95cbf18c95b4 100644 --- a/sdk/monitor/monitor-query/test/internal/unit/metricsQueryClient.unittest.spec.ts +++ b/sdk/monitor/monitor-query/test/internal/unit/metricsQueryClient.unittest.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Durations, MetricsQueryClient } from "../../../src"; it("verify tracing", async () => { diff --git a/sdk/monitor/monitor-query/test/public/metricsQueryClient.spec.ts b/sdk/monitor/monitor-query/test/public/metricsQueryClient.spec.ts index a8e11ec43366..873bdf5f71bc 100644 --- a/sdk/monitor/monitor-query/test/public/metricsQueryClient.spec.ts +++ b/sdk/monitor/monitor-query/test/public/metricsQueryClient.spec.ts @@ -3,7 +3,7 @@ import { assert } from "chai"; import { Context } from "mocha"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; import { Durations, MetricsQueryClient } from "../../src"; import { diff --git a/sdk/openai/openai-assistants/package.json b/sdk/openai/openai-assistants/package.json index a2720a23c5d2..60f02164be8c 100644 --- a/sdk/openai/openai-assistants/package.json +++ b/sdk/openai/openai-assistants/package.json @@ -100,7 +100,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", diff --git a/sdk/openai/openai-assistants/test/public/openaiassistants.spec.ts b/sdk/openai/openai-assistants/test/public/openaiassistants.spec.ts index 018c6adae2ec..0019ddf3bd41 100644 --- a/sdk/openai/openai-assistants/test/public/openaiassistants.spec.ts +++ b/sdk/openai/openai-assistants/test/public/openaiassistants.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { assertAssistantEquality } from "./utils/asserts.js"; import { AuthMethod, createClient, startRecorder } from "./utils/recordedClient.js"; import { getModels } from "./utils/utils.js"; diff --git a/sdk/openai/openai-assistants/test/public/utils/asserts.ts b/sdk/openai/openai-assistants/test/public/utils/asserts.ts index 04a8b3a07946..04ef03c2fe88 100644 --- a/sdk/openai/openai-assistants/test/public/utils/asserts.ts +++ b/sdk/openai/openai-assistants/test/public/utils/asserts.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Assistant, AssistantCreationOptions } from "../../../src/index.js"; export function assertAssistantEquality( diff --git a/sdk/openai/openai-assistants/test/public/utils/utils.ts b/sdk/openai/openai-assistants/test/public/utils/utils.ts index c37145c57bb3..6bfba978e61b 100644 --- a/sdk/openai/openai-assistants/test/public/utils/utils.ts +++ b/sdk/openai/openai-assistants/test/public/utils/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { PipelineRequest, PipelineResponse, diff --git a/sdk/openai/openai/package.json b/sdk/openai/openai/package.json index 31406d82749e..8acf9284f8f3 100644 --- a/sdk/openai/openai/package.json +++ b/sdk/openai/openai/package.json @@ -104,7 +104,7 @@ "@azure/abort-controller": "^1.1.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", diff --git a/sdk/openai/openai/test/internal/deserializer.spec.ts b/sdk/openai/openai/test/internal/deserializer.spec.ts index 27cc2adb5047..43944e864672 100644 --- a/sdk/openai/openai/test/internal/deserializer.spec.ts +++ b/sdk/openai/openai/test/internal/deserializer.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { getChatCompletionsResult, getCompletionsResult } from "../../src/api/operations.js"; const created = new Date("2022-01-01T00:00:00.000Z").getTime(); diff --git a/sdk/openai/openai/test/internal/oaiSse.ts b/sdk/openai/openai/test/internal/oaiSse.ts index b9cdd16586a2..68a20855971b 100644 --- a/sdk/openai/openai/test/internal/oaiSse.ts +++ b/sdk/openai/openai/test/internal/oaiSse.ts @@ -4,7 +4,7 @@ import { Client } from "@azure-rest/core-client"; import { getOaiSSEs } from "../../src/api/oaiSse.js"; import { assertAsyncIterable, createDataEvent, createDataLine, encoder } from "./util.js"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; const toEvent = (e: T): T => e; diff --git a/sdk/openai/openai/test/internal/util.ts b/sdk/openai/openai/test/internal/util.ts index bd06d97b747b..45050b6d1171 100644 --- a/sdk/openai/openai/test/internal/util.ts +++ b/sdk/openai/openai/test/internal/util.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; export async function assertAsyncIterable( iter: Promise>, diff --git a/sdk/openai/openai/test/public/abortsignal.spec.ts b/sdk/openai/openai/test/public/abortsignal.spec.ts index 62d63b871748..053317e49366 100644 --- a/sdk/openai/openai/test/public/abortsignal.spec.ts +++ b/sdk/openai/openai/test/public/abortsignal.spec.ts @@ -4,7 +4,7 @@ import { Context } from "mocha"; import { OpenAIClient } from "../../src/index.js"; import { createClient } from "./utils/recordedClient.js"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { AbortController } from "@azure/abort-controller"; import { isLiveMode } from "@azure-tools/test-recorder"; diff --git a/sdk/openai/openai/test/public/completions.spec.ts b/sdk/openai/openai/test/public/completions.spec.ts index bd40c15de048..788210f7119f 100644 --- a/sdk/openai/openai/test/public/completions.spec.ts +++ b/sdk/openai/openai/test/public/completions.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createClient, startRecorder } from "./utils/recordedClient.js"; import { diff --git a/sdk/openai/openai/test/public/embeddings.spec.ts b/sdk/openai/openai/test/public/embeddings.spec.ts index 6e7114e3485e..21bfa8c5a9e1 100644 --- a/sdk/openai/openai/test/public/embeddings.spec.ts +++ b/sdk/openai/openai/test/public/embeddings.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createClient, startRecorder } from "./utils/recordedClient.js"; import { getDeployments, getModels } from "./utils/utils.js"; diff --git a/sdk/openai/openai/test/public/images.spec.ts b/sdk/openai/openai/test/public/images.spec.ts index c577e6cd8ee6..6d6d2c7a5154 100644 --- a/sdk/openai/openai/test/public/images.spec.ts +++ b/sdk/openai/openai/test/public/images.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createClient, startRecorder } from "./utils/recordedClient.js"; import { diff --git a/sdk/openai/openai/test/public/node/whisper.spec.ts b/sdk/openai/openai/test/public/node/whisper.spec.ts index 2f6e0a2dc0e8..256ac1bcb0f4 100644 --- a/sdk/openai/openai/test/public/node/whisper.spec.ts +++ b/sdk/openai/openai/test/public/node/whisper.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createClient, startRecorder } from "../utils/recordedClient.js"; import { OpenAIClient } from "../../../src/index.js"; diff --git a/sdk/openai/openai/test/public/requestOptions.spec.ts b/sdk/openai/openai/test/public/requestOptions.spec.ts index ee4bb28ad529..b85676bcdbf4 100644 --- a/sdk/openai/openai/test/public/requestOptions.spec.ts +++ b/sdk/openai/openai/test/public/requestOptions.spec.ts @@ -5,7 +5,7 @@ import { Context } from "mocha"; import { OpenAIClient } from "../../src/index.js"; import { createClient, startRecorder } from "./utils/recordedClient.js"; import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe("Request options", () => { let client: OpenAIClient; diff --git a/sdk/openai/openai/test/public/samples.spec.ts b/sdk/openai/openai/test/public/samples.spec.ts index 64f419fd79c7..d0586328d546 100644 --- a/sdk/openai/openai/test/public/samples.spec.ts +++ b/sdk/openai/openai/test/public/samples.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { ChatCompletionsFunctionToolCall, diff --git a/sdk/openai/openai/test/public/utils/asserts.ts b/sdk/openai/openai/test/public/utils/asserts.ts index ba5c61bbff93..ef67c75da365 100644 --- a/sdk/openai/openai/test/public/utils/asserts.ts +++ b/sdk/openai/openai/test/public/utils/asserts.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { AudioResult, AudioResultFormat, diff --git a/sdk/openai/openai/test/public/utils/utils.ts b/sdk/openai/openai/test/public/utils/utils.ts index ff29fd732079..e24934f36ef5 100644 --- a/sdk/openai/openai/test/public/utils/utils.ts +++ b/sdk/openai/openai/test/public/utils/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { PipelineRequest, PipelineResponse, diff --git a/sdk/openai/openai/test/public/vision.spec.ts b/sdk/openai/openai/test/public/vision.spec.ts index fbce0709a409..b565553d6fb5 100644 --- a/sdk/openai/openai/test/public/vision.spec.ts +++ b/sdk/openai/openai/test/public/vision.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { Recorder } from "@azure-tools/test-recorder"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { Context } from "mocha"; import { createClient, startRecorder } from "./utils/recordedClient.js"; import { assertChatCompletions } from "./utils/asserts.js"; diff --git a/sdk/purview/purview-administration-rest/package.json b/sdk/purview/purview-administration-rest/package.json index 8b805554bc85..320cd0885a8a 100644 --- a/sdk/purview/purview-administration-rest/package.json +++ b/sdk/purview/purview-administration-rest/package.json @@ -92,7 +92,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", diff --git a/sdk/purview/purview-catalog-rest/package.json b/sdk/purview/purview-catalog-rest/package.json index 0895df9b4c51..a7d5bc283c0e 100644 --- a/sdk/purview/purview-catalog-rest/package.json +++ b/sdk/purview/purview-catalog-rest/package.json @@ -92,7 +92,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/purview/purview-scanning-rest/package.json b/sdk/purview/purview-scanning-rest/package.json index f5e7fe10068c..0427d64b191d 100644 --- a/sdk/purview/purview-scanning-rest/package.json +++ b/sdk/purview/purview-scanning-rest/package.json @@ -91,7 +91,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/schemaregistry/schema-registry-avro/package.json b/sdk/schemaregistry/schema-registry-avro/package.json index 23eb5aacb7ba..a74f779275de 100644 --- a/sdk/schemaregistry/schema-registry-avro/package.json +++ b/sdk/schemaregistry/schema-registry-avro/package.json @@ -83,7 +83,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/event-hubs": "^5.8.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure/core-rest-pipeline": "^1.12.1", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", diff --git a/sdk/schemaregistry/schema-registry-avro/test/internal/messageAdapter.spec.ts b/sdk/schemaregistry/schema-registry-avro/test/internal/messageAdapter.spec.ts index 50761a9f6407..cfd3572dfb37 100644 --- a/sdk/schemaregistry/schema-registry-avro/test/internal/messageAdapter.spec.ts +++ b/sdk/schemaregistry/schema-registry-avro/test/internal/messageAdapter.spec.ts @@ -10,7 +10,7 @@ import { import { AssertEqualKeys } from "../utils/utils"; import { MessageAdapter } from "../../src/models"; import { assert } from "chai"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; function isMessageAdapter(obj: any): obj is MessageAdapter { return typeof obj.produce === "function" && typeof obj.consume === "function"; diff --git a/sdk/schemaregistry/schema-registry-avro/test/public/utils/assertError.ts b/sdk/schemaregistry/schema-registry-avro/test/public/utils/assertError.ts index 292433c5f3d1..e9c5229e96ea 100644 --- a/sdk/schemaregistry/schema-registry-avro/test/public/utils/assertError.ts +++ b/sdk/schemaregistry/schema-registry-avro/test/public/utils/assertError.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; export async function assertError( p: Promise, diff --git a/sdk/schemaregistry/schema-registry-avro/test/public/withMessagingClients.spec.ts b/sdk/schemaregistry/schema-registry-avro/test/public/withMessagingClients.spec.ts index 044f76a39735..1c0b9f88ab5a 100644 --- a/sdk/schemaregistry/schema-registry-avro/test/public/withMessagingClients.spec.ts +++ b/sdk/schemaregistry/schema-registry-avro/test/public/withMessagingClients.spec.ts @@ -22,7 +22,7 @@ import { assertError } from "./utils/assertError"; import { createEventHubsClient } from "./clients/eventHubs"; import { createMockedMessagingClient } from "./clients/mocked"; import { createTestSerializer } from "./utils/mockedSerializer"; -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { testGroup } from "./utils/dummies"; import { Recorder, env } from "@azure-tools/test-recorder"; import { createPipelineWithCredential, removeSchemas } from "./utils/mockedRegistryClient"; diff --git a/sdk/schemaregistry/schema-registry-json/package.json b/sdk/schemaregistry/schema-registry-json/package.json index ae28e389cca0..0b32369b1fc7 100644 --- a/sdk/schemaregistry/schema-registry-json/package.json +++ b/sdk/schemaregistry/schema-registry-json/package.json @@ -79,7 +79,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/event-hubs": "^5.8.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/schemaregistry/schema-registry-json/test/public/errors.spec.ts b/sdk/schemaregistry/schema-registry-json/test/public/errors.spec.ts index 981c953b189a..9262b1acf17e 100644 --- a/sdk/schemaregistry/schema-registry-json/test/public/errors.spec.ts +++ b/sdk/schemaregistry/schema-registry-json/test/public/errors.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { JsonSerializer } from "../../src"; import { Context } from "mocha"; import { SchemaRegistry } from "@azure/schema-registry"; diff --git a/sdk/schemaregistry/schema-registry-json/test/public/jsonSerializer.spec.ts b/sdk/schemaregistry/schema-registry-json/test/public/jsonSerializer.spec.ts index dbb283b1785c..80fa2fcbf399 100644 --- a/sdk/schemaregistry/schema-registry-json/test/public/jsonSerializer.spec.ts +++ b/sdk/schemaregistry/schema-registry-json/test/public/jsonSerializer.spec.ts @@ -6,7 +6,7 @@ import { createTestSerializer, registerTestSchema, } from "./utils/mockedSerializer"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createContentType, encoder, testGroup, testSchema, testValue } from "./utils/dummies"; import { Context } from "mocha"; import { MessageContent } from "../../src"; diff --git a/sdk/schemaregistry/schema-registry-json/test/public/utils/assertError.ts b/sdk/schemaregistry/schema-registry-json/test/public/utils/assertError.ts index 292433c5f3d1..e9c5229e96ea 100644 --- a/sdk/schemaregistry/schema-registry-json/test/public/utils/assertError.ts +++ b/sdk/schemaregistry/schema-registry-json/test/public/utils/assertError.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; export async function assertError( p: Promise, diff --git a/sdk/schemaregistry/schema-registry-json/test/public/validation.spec.ts b/sdk/schemaregistry/schema-registry-json/test/public/validation.spec.ts index f2853db4a136..56be07003a1d 100644 --- a/sdk/schemaregistry/schema-registry-json/test/public/validation.spec.ts +++ b/sdk/schemaregistry/schema-registry-json/test/public/validation.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { DeserializeOptions, JsonSerializer } from "../../src"; import { SchemaRegistry } from "@azure/schema-registry"; import { createTestRegistry } from "./utils/mockedRegistryClient"; diff --git a/sdk/schemaregistry/schema-registry-json/test/public/withMessagingClients.spec.ts b/sdk/schemaregistry/schema-registry-json/test/public/withMessagingClients.spec.ts index b1de98a4d694..9c42002ab9ff 100644 --- a/sdk/schemaregistry/schema-registry-json/test/public/withMessagingClients.spec.ts +++ b/sdk/schemaregistry/schema-registry-json/test/public/withMessagingClients.spec.ts @@ -17,11 +17,10 @@ import { JsonSerializer } from "../../src"; import { EventData, createEventDataAdapter } from "@azure/event-hubs"; import { MessagingTestClient } from "./clients/models"; -import { assert } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { createEventHubsClient } from "./clients/eventHubs"; import { createMockedMessagingClient } from "./clients/mocked"; import { createTestSerializer } from "./utils/mockedSerializer"; -import { matrix } from "@azure/test-utils"; import { testGroup } from "./utils/dummies"; import { Recorder, env } from "@azure-tools/test-recorder"; import { SchemaRegistry } from "@azure/schema-registry"; diff --git a/sdk/schemaregistry/schema-registry/package.json b/sdk/schemaregistry/schema-registry/package.json index efd910be1be0..bf050a99b2b0 100644 --- a/sdk/schemaregistry/schema-registry/package.json +++ b/sdk/schemaregistry/schema-registry/package.json @@ -97,7 +97,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure/identity": "^4.0.1", "@microsoft/api-extractor": "^7.31.1", "@types/mocha": "^10.0.0", diff --git a/sdk/schemaregistry/schema-registry/test/public/schemaRegistry.spec.ts b/sdk/schemaregistry/schema-registry/test/public/schemaRegistry.spec.ts index 0ebe136a2f18..c1c65af22085 100644 --- a/sdk/schemaregistry/schema-registry/test/public/schemaRegistry.spec.ts +++ b/sdk/schemaregistry/schema-registry/test/public/schemaRegistry.spec.ts @@ -9,7 +9,7 @@ import { SchemaProperties, SchemaRegistryClient, } from "../../src"; -import { assert, matrix } from "@azure/test-utils"; +import { assert, matrix } from "@azure-tools/test-utils"; import { createRecordedClient, Format, recorderOptions } from "./utils/recordedClient"; import { ClientSecretCredential } from "@azure/identity"; import { Context } from "mocha"; diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index 1ed9c1a614ad..d4e7e2822292 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -100,7 +100,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/openai": "1.0.0-beta.13", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/search/search-documents/test/public/node/searchClient.spec.ts b/sdk/search/search-documents/test/public/node/searchClient.spec.ts index 997ff3dffe05..4578ac005bf0 100644 --- a/sdk/search/search-documents/test/public/node/searchClient.spec.ts +++ b/sdk/search/search-documents/test/public/node/searchClient.spec.ts @@ -6,7 +6,7 @@ import { assert } from "chai"; import { Context, Suite } from "mocha"; import { OpenAIClient } from "@azure/openai"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { AutocompleteResult, AzureKeyCredential, diff --git a/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts b/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts index b2b1bb70d514..620da41cfa72 100644 --- a/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts +++ b/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { env, isLiveMode, Recorder } from "@azure-tools/test-recorder"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; import { assert } from "chai"; import { Context, Suite } from "mocha"; import { diff --git a/sdk/servicebus/service-bus/package.json b/sdk/servicebus/service-bus/package.json index b5368294cbca..180bab86d37a 100644 --- a/sdk/servicebus/service-bus/package.json +++ b/sdk/servicebus/service-bus/package.json @@ -124,7 +124,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-perf": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/servicebus/service-bus/test/internal/operationOptionsForATOM.spec.ts b/sdk/servicebus/service-bus/test/internal/operationOptionsForATOM.spec.ts index f4cbbc890a0f..2f908611b23c 100644 --- a/sdk/servicebus/service-bus/test/internal/operationOptionsForATOM.spec.ts +++ b/sdk/servicebus/service-bus/test/internal/operationOptionsForATOM.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import chaiExclude from "chai-exclude"; diff --git a/sdk/servicebus/service-bus/test/internal/tracing.spec.ts b/sdk/servicebus/service-bus/test/internal/tracing.spec.ts index dc3a3cde1fc5..7e8b8b1b59f4 100644 --- a/sdk/servicebus/service-bus/test/internal/tracing.spec.ts +++ b/sdk/servicebus/service-bus/test/internal/tracing.spec.ts @@ -8,7 +8,7 @@ import { EntityName, createServiceBusClientForTests, } from "../public/utils/testutils2"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; describe(`Tracing for send`, function (): void { let sbClient: ServiceBusClientForTests; diff --git a/sdk/servicebus/service-bus/test/internal/unit/tracing.spec.ts b/sdk/servicebus/service-bus/test/internal/unit/tracing.spec.ts index 28df8b1eb505..420629dd7fe2 100644 --- a/sdk/servicebus/service-bus/test/internal/unit/tracing.spec.ts +++ b/sdk/servicebus/service-bus/test/internal/unit/tracing.spec.ts @@ -5,7 +5,7 @@ import { MockTracingSpan, assert, createMockTracingContext, -} from "@azure/test-utils"; +} from "@azure-tools/test-utils"; import { TRACEPARENT_PROPERTY, instrumentMessage, diff --git a/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts b/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts index 01f1b2dc841a..113b65070024 100644 --- a/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts +++ b/sdk/servicebus/service-bus/test/public/atomManagement.spec.ts @@ -20,7 +20,7 @@ import { EntityNames, TestClientType } from "./utils/testUtils"; import { TestConstants } from "./fakeTestSecrets"; import { AzureNamedKeyCredential } from "@azure/core-auth"; import { createServiceBusClientForTests, ServiceBusClientForTests } from "./utils/testutils2"; -import { versionsToTest } from "@azure/test-utils"; +import { versionsToTest } from "@azure-tools/test-utils"; chai.use(chaiAsPromised); chai.use(chaiExclude); diff --git a/sdk/servicebus/service-bus/test/public/utils/misc.ts b/sdk/servicebus/service-bus/test/public/utils/misc.ts index f55131dac39a..be52a9339559 100644 --- a/sdk/servicebus/service-bus/test/public/utils/misc.ts +++ b/sdk/servicebus/service-bus/test/public/utils/misc.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TestTracer, setTracer, resetTracer } from "@azure/test-utils"; +import { TestTracer, setTracer, resetTracer } from "@azure-tools/test-utils"; // some functions useful as we transition between interfaces and classes. export function setTracerForTest( diff --git a/sdk/storage/storage-blob-changefeed/package.json b/sdk/storage/storage-blob-changefeed/package.json index 55e73f9ffc0c..fab7b042c813 100644 --- a/sdk/storage/storage-blob-changefeed/package.json +++ b/sdk/storage/storage-blob-changefeed/package.json @@ -97,7 +97,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", diff --git a/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts b/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts index aed446f92149..aab5ecf9dee1 100644 --- a/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts +++ b/sdk/storage/storage-blob-changefeed/test/blobchangefeedclient.spec.ts @@ -5,7 +5,7 @@ import { isPlaybackMode, Recorder, env } from "@azure-tools/test-recorder"; import { recorderEnvSetup, getBlobChangeFeedClient, streamToString, uriSanitizers } from "./utils"; import { BlobChangeFeedClient, BlobChangeFeedEvent, BlobChangeFeedEventPage } from "../src"; import { AbortController } from "@azure/abort-controller"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { BlobServiceClient, RequestPolicy } from "@azure/storage-blob"; import { SDK_VERSION } from "../src/utils/constants"; import * as fs from "fs"; diff --git a/sdk/storage/storage-blob/package.json b/sdk/storage/storage-blob/package.json index 66585e8beef5..475d297310d9 100644 --- a/sdk/storage/storage-blob/package.json +++ b/sdk/storage/storage-blob/package.json @@ -141,7 +141,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-perf": "^1.0.0", diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 32fbe9e58fda..ee9091bb2ada 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -5,7 +5,7 @@ import * as fs from "fs"; import { randomUUID } from "@azure/core-util"; import { AbortController } from "@azure/abort-controller"; import { isNode } from "@azure/core-util"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { bodyToString, getBSU, diff --git a/sdk/storage/storage-blob/test/blobclientpollers.spec.ts b/sdk/storage/storage-blob/test/blobclientpollers.spec.ts index d94449289476..e10072f204ec 100644 --- a/sdk/storage/storage-blob/test/blobclientpollers.spec.ts +++ b/sdk/storage/storage-blob/test/blobclientpollers.spec.ts @@ -2,7 +2,6 @@ // Licensed under the MIT license. import { assert } from "chai"; - import { getBSU } from "./utils"; import { Recorder, isRecordMode, isPlaybackMode, isLiveMode } from "@azure-tools/test-recorder"; import { @@ -13,7 +12,7 @@ import { } from "./utils/testutils.common"; import { BlobClient, BlockBlobClient, ContainerClient, BlobBeginCopyFromURLResponse } from "../src"; import { Context } from "mocha"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe("BlobClient beginCopyFromURL Poller", () => { let containerName: string; @@ -56,7 +55,7 @@ describe("BlobClient beginCopyFromURL Poller", () => { }); it("supports automatic polling via pollUntilDone", async function () { - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } const newBlobClient = destinationContainerClient.getBlobClient( @@ -92,7 +91,7 @@ describe("BlobClient beginCopyFromURL Poller", () => { }); it("supports manual polling via poll", async function () { - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } const newBlobClient = destinationContainerClient.getBlobClient( @@ -139,7 +138,7 @@ describe("BlobClient beginCopyFromURL Poller", () => { // these tests will only run with the unit tests with pre-recorded service responses. this.skip(); } - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } @@ -166,7 +165,7 @@ describe("BlobClient beginCopyFromURL Poller", () => { // these tests will only run with the unit tests with pre-recorded service responses. this.skip(); } - if (!isNode) { + if (!isNodeLike) { this.skip(); } @@ -188,7 +187,7 @@ describe("BlobClient beginCopyFromURL Poller", () => { }); it("supports restoring poller state from another poller", async function () { - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } diff --git a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts index 1f87a2c00e74..ac77dafd6cf8 100644 --- a/sdk/storage/storage-blob/test/blobserviceclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobserviceclient.spec.ts @@ -16,7 +16,7 @@ import { uriSanitizers, } from "./utils"; import { delay, Recorder, isLiveMode } from "@azure-tools/test-recorder"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; import { Tags } from "../src/models"; import { Context } from "mocha"; diff --git a/sdk/storage/storage-blob/test/containerclient.spec.ts b/sdk/storage/storage-blob/test/containerclient.spec.ts index f6d6bb099db9..b9b269dacc54 100644 --- a/sdk/storage/storage-blob/test/containerclient.spec.ts +++ b/sdk/storage/storage-blob/test/containerclient.spec.ts @@ -14,7 +14,7 @@ import { uriSanitizers, } from "./utils"; import { delay, Recorder } from "@azure-tools/test-recorder"; -import { getYieldedValue, assert } from "@azure/test-utils"; +import { getYieldedValue, assert } from "@azure-tools/test-utils"; import { ContainerClient, BlockBlobTier, diff --git a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts index 4526165e27cc..70fa42dff7e6 100644 --- a/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts +++ b/sdk/storage/storage-blob/test/node/highlevel.node.spec.ts @@ -6,7 +6,6 @@ import * as buffer from "buffer"; import * as fs from "fs"; import * as path from "path"; import { PassThrough, Readable } from "stream"; - import { AbortController } from "@azure/abort-controller"; import { createRandomLocalFile, @@ -24,7 +23,7 @@ import { BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES } from "../../src/utils/constants"; import { Test_CPK_INFO } from "../utils/fakeTestSecrets"; import { streamToBuffer2 } from "../../src/utils/utils.node"; import { Context } from "mocha"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe("Highlevel", () => { let containerName: string; @@ -98,7 +97,7 @@ describe("Highlevel", () => { }); it("put blob with maximum size", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const MB = 1024 * 1024; @@ -118,7 +117,7 @@ describe("Highlevel", () => { }).timeout(timeoutForLargeFileUploadingTest); it("uploadFile should success when blob >= BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } await blockBlobClient.uploadFile(tempFileLarge, { @@ -141,7 +140,7 @@ describe("Highlevel", () => { }).timeout(timeoutForLargeFileUploadingTest); it("uploadFile should work with tags", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } @@ -161,7 +160,7 @@ describe("Highlevel", () => { }); it("uploadFile should success when blob < BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } await blockBlobClient.uploadFile(tempFileSmall, { @@ -184,7 +183,7 @@ describe("Highlevel", () => { }); it("uploadFile should success when blob < BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES and configured maxSingleShotSize", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } await blockBlobClient.uploadFile(tempFileSmall, { @@ -282,7 +281,7 @@ describe("Highlevel", () => { }); it("uploadFile should succeed with blockSize = BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const tempFile = await createRandomLocalFile( @@ -303,7 +302,7 @@ describe("Highlevel", () => { }).timeout(timeoutForLargeFileUploadingTest); it("uploadStream should success", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -341,7 +340,7 @@ describe("Highlevel", () => { }); it("uploadStream should work with tags", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } @@ -361,7 +360,7 @@ describe("Highlevel", () => { }); it("uploadStream should abort", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -378,7 +377,7 @@ describe("Highlevel", () => { }); it("uploadStream should update progress event", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -408,7 +407,7 @@ describe("Highlevel", () => { it.skip( "uploadStream should work when blockSize = BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const tempFile = await createRandomLocalFile( @@ -432,7 +431,7 @@ describe("Highlevel", () => { ).timeout(timeoutForLargeFileUploadingTest); it("downloadToBuffer should success - without passing the buffer", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -464,7 +463,7 @@ describe("Highlevel", () => { }); it("downloadToBuffer should success", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -515,7 +514,7 @@ describe("Highlevel", () => { }); it("downloadToBuffer should abort", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileLarge); @@ -536,7 +535,7 @@ describe("Highlevel", () => { }).timeout(timeoutForLargeFileUploadingTest); it("downloadToBuffer should update progress event", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileSmall); @@ -586,7 +585,7 @@ describe("Highlevel", () => { }); it("blobclient.download should success when internal stream unexpected ends at the stream end", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { @@ -625,7 +624,7 @@ describe("Highlevel", () => { }); it("blobclient.download should download full data successfully when internal stream unexpected ends", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { @@ -665,7 +664,7 @@ describe("Highlevel", () => { }); it("blobclient.download should download partial data when internal stream unexpected ends", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { @@ -707,7 +706,7 @@ describe("Highlevel", () => { }); it("blobclient.download should download data failed when exceeding max stream retry requests", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { @@ -747,7 +746,7 @@ describe("Highlevel", () => { }); it("blobclient.download should abort after retries", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const uploadResponse = await blockBlobClient.uploadFile(tempFileSmall, { @@ -792,7 +791,7 @@ describe("Highlevel", () => { }); it("download abort should work when still fetching body", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } await blockBlobClient.uploadFile(tempFileSmall, { @@ -818,7 +817,7 @@ describe("Highlevel", () => { }); it("downloadToFile should success", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const downloadedFilePath = recorder.variable( @@ -848,7 +847,7 @@ describe("Highlevel", () => { }); it("downloadToFile should fail when saving to directory", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } const rs = fs.createReadStream(tempFileSmall); @@ -863,7 +862,7 @@ describe("Highlevel", () => { }); it("set tier while upload", async function () { - if (isNode && !isLiveMode()) { + if (isNodeLike && !isLiveMode()) { this.skip(); } // single upload diff --git a/sdk/storage/storage-blob/test/pageblobclient.spec.ts b/sdk/storage/storage-blob/test/pageblobclient.spec.ts index 66b533831153..774a578a20ce 100644 --- a/sdk/storage/storage-blob/test/pageblobclient.spec.ts +++ b/sdk/storage/storage-blob/test/pageblobclient.spec.ts @@ -21,7 +21,7 @@ import { } from "../src"; import { Recorder } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; describe("PageBlobClient", () => { let blobServiceClient: BlobServiceClient; diff --git a/sdk/storage/storage-file-datalake/package.json b/sdk/storage/storage-file-datalake/package.json index 46e382cf33a9..03a8761d16fb 100644 --- a/sdk/storage/storage-file-datalake/package.json +++ b/sdk/storage/storage-file-datalake/package.json @@ -125,7 +125,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-perf": "^1.0.0", diff --git a/sdk/storage/storage-file-datalake/test/filesystemclient.spec.ts b/sdk/storage/storage-file-datalake/test/filesystemclient.spec.ts index 99e5a4c0d228..9511618c492e 100644 --- a/sdk/storage/storage-file-datalake/test/filesystemclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/filesystemclient.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert, getYieldedValue } from "@azure/test-utils"; +import { assert, getYieldedValue } from "@azure-tools/test-utils"; import { isLiveMode, Recorder } from "@azure-tools/test-recorder"; import { useFakeTimers } from "sinon"; diff --git a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts index b8a6b2065388..1c1fec0f5639 100644 --- a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. import { AbortController } from "@azure/abort-controller"; -import { isNode } from "@azure/core-util"; -import { assert } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; +import { assert } from "@azure-tools/test-utils"; import { isPlaybackMode, Recorder, delay } from "@azure-tools/test-recorder"; import { DataLakeDirectoryClient, DataLakeFileClient, DataLakeFileSystemClient } from "../src"; @@ -890,7 +890,7 @@ describe("DataLakePathClient", () => { contentDisposition: "contentDisposition", contentEncoding: "contentEncoding", contentLanguage: "contentLanguage", - contentMD5: isNode ? Buffer.from([1, 2, 3, 4]) : new Uint8Array([1, 2, 3, 4]), + contentMD5: isNodeLike ? Buffer.from([1, 2, 3, 4]) : new Uint8Array([1, 2, 3, 4]), contentType: "contentType", }; await fileClient.setHttpHeaders(headers); diff --git a/sdk/storage/storage-file-datalake/test/serviceclient.spec.ts b/sdk/storage/storage-file-datalake/test/serviceclient.spec.ts index fbe99130f38f..1f9e4210a49b 100644 --- a/sdk/storage/storage-file-datalake/test/serviceclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/serviceclient.spec.ts @@ -2,10 +2,10 @@ // Licensed under the MIT license. import { delay, isLiveMode, Recorder } from "@azure-tools/test-recorder"; -import { getYieldedValue, isNode } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; import { assert } from "chai"; import { Context } from "mocha"; - +import { isNodeLike } from "@azure/core-util"; import { DataLakeServiceClient, DataLakeServiceProperties, @@ -237,7 +237,7 @@ describe("DataLakeServiceClient", () => { it("ListFileSystems with all parameters configured", async function (this: Context) { // Skip browser mock test because of account name replacement issue with recorded requests - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } @@ -371,7 +371,7 @@ describe("DataLakeServiceClient", () => { it("Verify PagedAsyncIterableIterator(byPage()) for ListFileSystems", async function (this: Context) { // Skip browser mock test because of account name replacement issue with recorded requests - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } @@ -412,7 +412,7 @@ describe("DataLakeServiceClient", () => { it("Verify PagedAsyncIterableIterator(byPage() - continuationToken) for ListFileSystems", async function (this: Context) { // Skip browser mock test because of account name replacement issue with recorded requests - if (!isNode && !isLiveMode()) { + if (!isNodeLike && !isLiveMode()) { this.skip(); } diff --git a/sdk/storage/storage-file-share/package.json b/sdk/storage/storage-file-share/package.json index d16e01966133..896998eb9d9c 100644 --- a/sdk/storage/storage-file-share/package.json +++ b/sdk/storage/storage-file-share/package.json @@ -132,7 +132,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-perf": "^1.0.0", diff --git a/sdk/storage/storage-file-share/test/directoryclient.spec.ts b/sdk/storage/storage-file-share/test/directoryclient.spec.ts index c4e00a36475b..7ad25039c68c 100644 --- a/sdk/storage/storage-file-share/test/directoryclient.spec.ts +++ b/sdk/storage/storage-file-share/test/directoryclient.spec.ts @@ -6,7 +6,7 @@ import { ShareClient, ShareDirectoryClient, FileSystemAttributes } from "../src" import { Recorder, isLiveMode } from "@azure-tools/test-recorder"; import { DirectoryCreateResponse } from "../src/generated/src/models"; import { truncatedISO8061Date } from "../src/utils/utils.common"; -import { assert, getYieldedValue } from "@azure/test-utils"; +import { assert, getYieldedValue } from "@azure-tools/test-utils"; import { isBrowser } from "@azure/core-util"; import { Context } from "mocha"; diff --git a/sdk/storage/storage-file-share/test/fileclient.spec.ts b/sdk/storage/storage-file-share/test/fileclient.spec.ts index cd9dd63f7f88..fa8a72564594 100644 --- a/sdk/storage/storage-file-share/test/fileclient.spec.ts +++ b/sdk/storage/storage-file-share/test/fileclient.spec.ts @@ -5,7 +5,7 @@ import { AbortController } from "@azure/abort-controller"; import { isNode, isBrowser } from "@azure/core-util"; import { delay, isLiveMode, Recorder } from "@azure-tools/test-recorder"; import { Context } from "mocha"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { FileStartCopyOptions, diff --git a/sdk/storage/storage-file-share/test/fileserviceclient.spec.ts b/sdk/storage/storage-file-share/test/fileserviceclient.spec.ts index e03829ce3f6f..855a33157e16 100644 --- a/sdk/storage/storage-file-share/test/fileserviceclient.spec.ts +++ b/sdk/storage/storage-file-share/test/fileserviceclient.spec.ts @@ -16,7 +16,7 @@ import { import { delay, Recorder } from "@azure-tools/test-recorder"; import { ShareServiceClient, ShareItem, ShareRootSquash } from "../src"; import { Context } from "mocha"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; describe("FileServiceClient", () => { let recorder: Recorder; diff --git a/sdk/storage/storage-queue/package.json b/sdk/storage/storage-queue/package.json index 5d571d67aeb3..fdbd7dfd4539 100644 --- a/sdk/storage/storage-queue/package.json +++ b/sdk/storage/storage-queue/package.json @@ -126,7 +126,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", "@azure/storage-blob": "^12.23.0-beta.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", diff --git a/sdk/storage/storage-queue/test/queueclient.spec.ts b/sdk/storage/storage-queue/test/queueclient.spec.ts index b1a0f46a4293..61151c53f8a7 100644 --- a/sdk/storage/storage-queue/test/queueclient.spec.ts +++ b/sdk/storage/storage-queue/test/queueclient.spec.ts @@ -10,7 +10,7 @@ import { uriSanitizers, } from "./utils"; import { QueueClient, QueueServiceClient } from "../src"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { RestError } from "@azure/core-rest-pipeline"; import { Recorder } from "@azure-tools/test-recorder"; import { Context } from "mocha"; diff --git a/sdk/storage/storage-queue/test/queueserviceclient.spec.ts b/sdk/storage/storage-queue/test/queueserviceclient.spec.ts index a510468bd84d..49310e2e3427 100644 --- a/sdk/storage/storage-queue/test/queueserviceclient.spec.ts +++ b/sdk/storage/storage-queue/test/queueserviceclient.spec.ts @@ -10,7 +10,7 @@ import { uriSanitizers, } from "./utils"; import { delay, Recorder } from "@azure-tools/test-recorder"; -import { getYieldedValue } from "@azure/test-utils"; +import { getYieldedValue } from "@azure-tools/test-utils"; import { configureStorageClient, getUniqueName, recorderEnvSetup } from "./utils/index.browser"; import { Context } from "mocha"; diff --git a/sdk/synapse/synapse-access-control/package.json b/sdk/synapse/synapse-access-control/package.json index 3856a1bd5620..f437b55f5ba6 100644 --- a/sdk/synapse/synapse-access-control/package.json +++ b/sdk/synapse/synapse-access-control/package.json @@ -49,7 +49,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.1.6", "@types/mocha": "^10.0.0", diff --git a/sdk/synapse/synapse-managed-private-endpoints/package.json b/sdk/synapse/synapse-managed-private-endpoints/package.json index bb2f1bfa2de6..c2c4bf3614e1 100644 --- a/sdk/synapse/synapse-managed-private-endpoints/package.json +++ b/sdk/synapse/synapse-managed-private-endpoints/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "typescript": "~5.4.5", "eslint": "^8.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", diff --git a/sdk/synapse/synapse-monitoring/package.json b/sdk/synapse/synapse-monitoring/package.json index 21e6769234c4..ee74ae57f1f9 100644 --- a/sdk/synapse/synapse-monitoring/package.json +++ b/sdk/synapse/synapse-monitoring/package.json @@ -31,7 +31,7 @@ "devDependencies": { "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/synapse/synapse-monitoring/test/public/test.spec.ts b/sdk/synapse/synapse-monitoring/test/public/test.spec.ts index e6975ed3c4c6..9ef821886beb 100644 --- a/sdk/synapse/synapse-monitoring/test/public/test.spec.ts +++ b/sdk/synapse/synapse-monitoring/test/public/test.spec.ts @@ -1,6 +1,6 @@ import { MonitoringClient } from "../../src/monitoringClient"; import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createClient, createRecorder } from "./utils/recordedClient"; import { Context } from "mocha"; diff --git a/sdk/synapse/synapse-spark/package.json b/sdk/synapse/synapse-spark/package.json index df274718e6eb..d6d6f2c70387 100644 --- a/sdk/synapse/synapse-spark/package.json +++ b/sdk/synapse/synapse-spark/package.json @@ -34,7 +34,7 @@ "@microsoft/api-extractor": "^7.31.1", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@types/chai": "^4.1.6", "@types/chai-as-promised": "^7.1.0", "@types/mocha": "^10.0.0", diff --git a/sdk/tables/data-tables/package.json b/sdk/tables/data-tables/package.json index 9b1aa375abce..fd2e29d3d452 100644 --- a/sdk/tables/data-tables/package.json +++ b/sdk/tables/data-tables/package.json @@ -116,7 +116,7 @@ "dotenv": "^16.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "ts-node": "^10.0.0" }, "//sampleConfiguration": { diff --git a/sdk/tables/data-tables/test/internal/serialization.spec.ts b/sdk/tables/data-tables/test/internal/serialization.spec.ts index b3204abdafac..2ce109f606ea 100644 --- a/sdk/tables/data-tables/test/internal/serialization.spec.ts +++ b/sdk/tables/data-tables/test/internal/serialization.spec.ts @@ -10,7 +10,6 @@ import { import { Edm } from "../../src"; import { assert } from "chai"; -import { isNode8 } from "@azure/test-utils"; interface Entity { strProp?: string; @@ -170,9 +169,6 @@ describe("Deserializer", function () { }); it("should deserialize an Int64 value to bigint", function (this: Mocha.Context) { - if (isNode8) { - this.skip(); - } const int64Value = "12345678910"; const deserialized = deserialize({ int64ObjProp: int64Value, diff --git a/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts b/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts index 8037e4e31165..748ac9bfd374 100644 --- a/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts +++ b/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts @@ -12,7 +12,7 @@ import { AzureNamedKeyCredential } from "@azure/core-auth"; import { Context } from "mocha"; import { assert } from "chai"; import { expectedSharedKeyLiteHeader } from "./fakeTestSecrets"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { tablesNamedKeyCredentialPolicy } from "../../src/tablesNamedCredentialPolicy"; describe("TablesSharedKeyCredential", function () { @@ -27,7 +27,7 @@ describe("TablesSharedKeyCredential", function () { }); it("It should sign", async function (this: Context) { - if (!isNode) { + if (!isNodeLike) { // AzureNamedKeyCredential auth is not supported in Browser this.skip(); } diff --git a/sdk/tables/data-tables/test/internal/utils.spec.ts b/sdk/tables/data-tables/test/internal/utils.spec.ts index 22c3cb104d19..6fb5517fe8c7 100644 --- a/sdk/tables/data-tables/test/internal/utils.spec.ts +++ b/sdk/tables/data-tables/test/internal/utils.spec.ts @@ -7,13 +7,13 @@ import { ConnectionString } from "../../src/utils/internalModels"; import { Context } from "mocha"; import { assert } from "chai"; import { extractConnectionStringParts } from "../../src/utils/connectionString"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe("Utility Helpers", function () { describe("extractConnectionStringParts", function () { describe("Account Connection String", function () { beforeEach(function (this: Context) { - if (!isNode) { + if (!isNodeLike) { // Account connection string is not supported for Browsers this.skip(); } diff --git a/sdk/tables/data-tables/test/public/accessPolicy.spec.ts b/sdk/tables/data-tables/test/public/accessPolicy.spec.ts index 4492175c074e..a99c8867707f 100644 --- a/sdk/tables/data-tables/test/public/accessPolicy.spec.ts +++ b/sdk/tables/data-tables/test/public/accessPolicy.spec.ts @@ -7,7 +7,7 @@ import { Context } from "mocha"; import { TableClient } from "../../src"; import { assert } from "chai"; import { createTableClient } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe(`Access Policy operations`, function () { let client: TableClient; @@ -25,7 +25,7 @@ describe(`Access Policy operations`, function () { }); before(async function (this: Context) { - if (!isNode) { + if (!isNodeLike) { this.skip(); } @@ -36,7 +36,7 @@ describe(`Access Policy operations`, function () { }); after(async function () { - if (!isPlaybackMode() && isNode) { + if (!isPlaybackMode() && isNodeLike) { await unrecordedClient.deleteTable(); } }); diff --git a/sdk/tables/data-tables/test/public/authStrategies.spec.ts b/sdk/tables/data-tables/test/public/authStrategies.spec.ts index d9a2041fc966..93994c9698ad 100644 --- a/sdk/tables/data-tables/test/public/authStrategies.spec.ts +++ b/sdk/tables/data-tables/test/public/authStrategies.spec.ts @@ -9,11 +9,11 @@ import { TableClient } from "../../src/TableClient"; import { TableServiceClient } from "../../src/TableServiceClient"; import { assert } from "chai"; import { isLiveMode } from "@azure-tools/test-recorder"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; import { odata } from "../../src/odata"; -const platform = isNode ? "node" : "browser"; -const authMethods: CreateClientMode[] = isNode +const platform = isNodeLike ? "node" : "browser"; +const authMethods: CreateClientMode[] = isNodeLike ? ["AccountKey", "AccountConnectionString", "SASConnectionString", "SASToken", "TokenCredential"] : ["SASConnectionString", "SASToken", "TokenCredential"]; diff --git a/sdk/tables/data-tables/test/public/specialCharacters.spec.ts b/sdk/tables/data-tables/test/public/specialCharacters.spec.ts index faa805157a60..d51390102e07 100644 --- a/sdk/tables/data-tables/test/public/specialCharacters.spec.ts +++ b/sdk/tables/data-tables/test/public/specialCharacters.spec.ts @@ -7,7 +7,7 @@ import { Context } from "mocha"; import { assert } from "chai"; import { createTableClient } from "./utils/recordedClient"; import { isLiveMode } from "@azure-tools/test-recorder"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe("SpecialCharacters", function () { before(function (this: Context) { @@ -17,7 +17,7 @@ describe("SpecialCharacters", function () { } }); let client: TableClient; - const suffix = isNode ? "Node" : "Browser"; + const suffix = isNodeLike ? "Node" : "Browser"; const tableName = `SpecialCharacterTest${suffix}`; const specialCharacters = [ { char: `'`, name: "single quote" }, diff --git a/sdk/tables/data-tables/test/public/tableclient.spec.ts b/sdk/tables/data-tables/test/public/tableclient.spec.ts index d5c79a29add6..30c2c6e0795c 100644 --- a/sdk/tables/data-tables/test/public/tableclient.spec.ts +++ b/sdk/tables/data-tables/test/public/tableclient.spec.ts @@ -3,11 +3,10 @@ import { Edm, TableClient, TableEntity, TableEntityResult, odata } from "../../src"; import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { isNode, isNode8 } from "@azure/test-utils"; - +import { isNodeLike } from "@azure/core-util"; import { Context } from "mocha"; import { FullOperationResponse, OperationOptions } from "@azure/core-client"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { createTableClient } from "./utils/recordedClient"; describe("special characters", function () { @@ -51,7 +50,7 @@ describe(`TableClient`, function () { let client: TableClient; let unRecordedClient: TableClient; let recorder: Recorder; - const suffix = isNode ? "node" : "browser"; + const suffix = isNodeLike ? "node" : "browser"; const tableName = `tableClientTest${suffix}`; const listPartitionKey = "listEntitiesTest"; @@ -184,11 +183,11 @@ describe(`TableClient`, function () { all = [...all, entity]; } - if (isNode) { + if (isNodeLike) { assert.deepEqual(all[0].foo, Buffer.from("Bar")); } - if (!isNode) { + if (!isNodeLike) { assert.deepEqual(String.fromCharCode(...all[0].foo), "Bar"); } }); @@ -307,12 +306,12 @@ describe(`TableClient`, function () { const result = await client.getEntity(expected.partitionKey, expected.rowKey); - if (isNode) { + if (isNodeLike) { assert.deepEqual(result.binary, Buffer.from("Bar")); assert.deepEqual(result.binaryMetadata, Buffer.from("Bar")); } - if (!isNode) { + if (!isNodeLike) { assert.deepEqual(String.fromCharCode(...result.binary), "Bar"); assert.deepEqual(String.fromCharCode(...result.binaryMetadata), "Bar"); } @@ -428,9 +427,6 @@ describe(`TableClient`, function () { }); it("should createEntity with Int64", async function (this: Mocha.Context) { - if (isNode8) { - this.skip(); - } type TestType = { testField: Edm<"Int64">; }; diff --git a/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts b/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts index 1ecf6f779c31..01cb13869f6b 100644 --- a/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts +++ b/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts @@ -3,16 +3,16 @@ import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; import { TableItem, TableItemResultPage, TableServiceClient, odata } from "../../src"; - import { Context } from "mocha"; import { FullOperationResponse, OperationOptions } from "@azure/core-client"; import { createTableServiceClient } from "./utils/recordedClient"; -import { isNode, assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; +import { isNodeLike } from "@azure/core-util"; describe(`TableServiceClient`, function () { let client: TableServiceClient; let recorder: Recorder; - const suffix = isNode ? `node` : `browser`; + const suffix = isNodeLike ? `node` : `browser`; beforeEach(async function (this: Context) { recorder = new Recorder(this.currentTest); diff --git a/sdk/tables/data-tables/test/public/transaction.spec.ts b/sdk/tables/data-tables/test/public/transaction.spec.ts index 0db513ab00c7..a93a349be4f3 100644 --- a/sdk/tables/data-tables/test/public/transaction.spec.ts +++ b/sdk/tables/data-tables/test/public/transaction.spec.ts @@ -2,15 +2,13 @@ // Licensed under the MIT license. import * as sinon from "sinon"; - import { Recorder, isPlaybackMode, isLiveMode } from "@azure-tools/test-recorder"; import { TableClient, TableTransaction, TransactionAction, odata } from "../../src"; - import { Context } from "mocha"; import { Uuid } from "../../src/utils/uuid"; import { assert } from "chai"; import { createTableClient } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { isNodeLike } from "@azure/core-util"; const partitionKey = "batchTest"; const testEntities = [ @@ -19,7 +17,7 @@ const testEntities = [ { partitionKey, rowKey: "3", name: "third" }, ]; -const suffix = isNode ? "node" : "browser"; +const suffix = isNodeLike ? "node" : "browser"; describe("concurrent batch operations", function () { const concurrentTableName = `concurrentBatchTableTest${suffix}`; diff --git a/sdk/template/template-dpg/package.json b/sdk/template/template-dpg/package.json index 83a87bcbf2a3..526c4998e1df 100644 --- a/sdk/template/template-dpg/package.json +++ b/sdk/template/template-dpg/package.json @@ -83,7 +83,7 @@ "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure-tools/test-credential": "^1.0.4", "@azure-tools/test-recorder": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", "@types/chai": "^4.3.1", "@types/mocha": "^10.0.0", diff --git a/sdk/template/template/package.json b/sdk/template/template/package.json index 3f4c0d90c013..d0548682a8f1 100644 --- a/sdk/template/template/package.json +++ b/sdk/template/template/package.json @@ -95,7 +95,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@microsoft/api-extractor": "^7.40.3", "@types/fs-extra": "^8.0.0", "@types/node": "^18.0.0", diff --git a/sdk/template/template/test/internal/basic.spec.ts b/sdk/template/template/test/internal/basic.spec.ts index 5c242cd71e19..89f8c6ad08a4 100644 --- a/sdk/template/template/test/internal/basic.spec.ts +++ b/sdk/template/template/test/internal/basic.spec.ts @@ -4,7 +4,7 @@ // Chai is the Azure SDK Team's preferred assertion library, and it is included // as part of our template project. // For convenience, we export an instance of Chai that comes pre-loaded with often-used plugins. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { describe, it } from "vitest"; // Import the internal function to be tested using the normal relative import diff --git a/sdk/template/template/test/public/configurationClient.spec.ts b/sdk/template/template/test/public/configurationClient.spec.ts index 48278a9eca5a..143fe3f2d2fb 100644 --- a/sdk/template/template/test/public/configurationClient.spec.ts +++ b/sdk/template/template/test/public/configurationClient.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { ConfigurationClient } from "../../src/index.js"; import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; diff --git a/sdk/test-utils/test-utils/package.json b/sdk/test-utils/test-utils/package.json index 39feb6bb1501..c76c686312d3 100644 --- a/sdk/test-utils/test-utils/package.json +++ b/sdk/test-utils/test-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@azure/test-utils", + "name": "@azure-tools/test-utils", "version": "1.0.0", "sdk-type": "utility", "description": "Test utilities library for the Azure SDK for JavaScript and TypeScript", diff --git a/sdk/test-utils/test-utils/src/chaiAzure.ts b/sdk/test-utils/test-utils/src/chaiAzure.ts index c11d735cf33b..faaa4f0f0d6b 100644 --- a/sdk/test-utils/test-utils/src/chaiAzure.ts +++ b/sdk/test-utils/test-utils/src/chaiAzure.ts @@ -12,7 +12,7 @@ import { supportsTracing } from "./tracing/chaiAzureTrace"; * * ```ts * import chai from "chai"; - * import { chaiAzure } from "@azure/test-utils"; + * import { chaiAzure } from "@azure-tools/test-utils"; * chai.use(chaiAzure); * * it("supportsTracing", async () => { diff --git a/sdk/textanalytics/ai-text-analytics/package.json b/sdk/textanalytics/ai-text-analytics/package.json index b232fdeb129e..9eb72618ff4e 100644 --- a/sdk/textanalytics/ai-text-analytics/package.json +++ b/sdk/textanalytics/ai-text-analytics/package.json @@ -105,7 +105,7 @@ "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "^4.0.1", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/textanalytics/ai-text-analytics/test/public/textAnalyticsClient.spec.ts b/sdk/textanalytics/ai-text-analytics/test/public/textAnalyticsClient.spec.ts index 8d87cc5496f9..84828c793eb1 100644 --- a/sdk/textanalytics/ai-text-analytics/test/public/textAnalyticsClient.spec.ts +++ b/sdk/textanalytics/ai-text-analytics/test/public/textAnalyticsClient.spec.ts @@ -8,7 +8,7 @@ import { Context, Suite } from "mocha"; import chaiPromises from "chai-as-promised"; chaiUse(chaiPromises); -import { matrix } from "@azure/test-utils"; +import { matrix } from "@azure-tools/test-utils"; import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; import { AuthMethod, createClient, startRecorder } from "./utils/recordedClient"; diff --git a/sdk/web-pubsub/web-pubsub-client-protobuf/package.json b/sdk/web-pubsub/web-pubsub-client-protobuf/package.json index f19413a656b3..0879bb856b5c 100644 --- a/sdk/web-pubsub/web-pubsub-client-protobuf/package.json +++ b/sdk/web-pubsub/web-pubsub-client-protobuf/package.json @@ -104,7 +104,7 @@ "source-map-support": "^0.5.9", "typescript": "~5.4.5", "@azure/web-pubsub": "^1.1.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "mock-socket": "^9.1.5", "util": "^0.12.1", "@types/ws": "^7.4.5", diff --git a/sdk/web-pubsub/web-pubsub-client/package.json b/sdk/web-pubsub/web-pubsub-client/package.json index 019b68c67ce6..bca1a2f93a33 100644 --- a/sdk/web-pubsub/web-pubsub-client/package.json +++ b/sdk/web-pubsub/web-pubsub-client/package.json @@ -109,7 +109,7 @@ "source-map-support": "^0.5.9", "typescript": "~5.4.5", "@azure/web-pubsub": "^1.1.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "mock-socket": "^9.1.5", "util": "^0.12.1", "@types/ws": "^7.4.5", diff --git a/sdk/web-pubsub/web-pubsub-client/test/client.messages.spec.ts b/sdk/web-pubsub/web-pubsub-client/test/client.messages.spec.ts index bebf3d11fc09..80c235157e36 100644 --- a/sdk/web-pubsub/web-pubsub-client/test/client.messages.spec.ts +++ b/sdk/web-pubsub/web-pubsub-client/test/client.messages.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import sinon from "sinon"; import { DisconnectedMessage, diff --git a/sdk/web-pubsub/web-pubsub-client/test/client.spec.ts b/sdk/web-pubsub/web-pubsub-client/test/client.spec.ts index 6bfeadd196a1..3105becc3d8d 100644 --- a/sdk/web-pubsub/web-pubsub-client/test/client.spec.ts +++ b/sdk/web-pubsub/web-pubsub-client/test/client.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert, expect } from "@azure/test-utils"; +import { assert, expect } from "@azure-tools/test-utils"; import { WebPubSubClientOptions } from "../src/models"; import { WebPubSubJsonProtocol } from "../src/protocols"; import { WebPubSubClient } from "../src/webPubSubClient"; diff --git a/sdk/web-pubsub/web-pubsub-client/test/jsonProtocol.spec.ts b/sdk/web-pubsub/web-pubsub-client/test/jsonProtocol.spec.ts index 9874dfc14f60..e0c6ff48e39d 100644 --- a/sdk/web-pubsub/web-pubsub-client/test/jsonProtocol.spec.ts +++ b/sdk/web-pubsub/web-pubsub-client/test/jsonProtocol.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import { AckMessage, ConnectedMessage, diff --git a/sdk/web-pubsub/web-pubsub/package.json b/sdk/web-pubsub/web-pubsub/package.json index 06ce538895f0..5cc93ed7bd30 100644 --- a/sdk/web-pubsub/web-pubsub/package.json +++ b/sdk/web-pubsub/web-pubsub/package.json @@ -80,7 +80,7 @@ "devDependencies": { "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/test-utils": "^1.0.0", + "@azure-tools/test-utils": "^1.0.0", "@azure-tools/test-credential": "^1.0.0", "@azure-tools/test-recorder": "^3.0.0", "@microsoft/api-extractor": "^7.31.1", diff --git a/sdk/web-pubsub/web-pubsub/test/hubs.spec.ts b/sdk/web-pubsub/web-pubsub/test/hubs.spec.ts index 35f4eb21ae42..c69714e5f0f4 100644 --- a/sdk/web-pubsub/web-pubsub/test/hubs.spec.ts +++ b/sdk/web-pubsub/web-pubsub/test/hubs.spec.ts @@ -3,7 +3,7 @@ /* eslint-disable no-invalid-this */ import { Recorder, isLiveMode, assertEnvironmentVariable } from "@azure-tools/test-recorder"; import { WebPubSubServiceClient, AzureKeyCredential } from "../src"; -import { assert } from "@azure/test-utils"; +import { assert } from "@azure-tools/test-utils"; import recorderOptions from "./testEnv"; import { FullOperationResponse } from "@azure/core-client"; import { createTestCredential } from "@azure-tools/test-credential";