-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[commerce] Update commerce package to use snippet extraction (#32559)
### Packages impacted by this PR - @azure/arm-commerce - @azure/arm-commerce-profile-2020-09-01-hybrid ### Issues associated with this PR - #32416 ### Describe the problem that is addressed by this PR Updates all projects under `commerce` to use snippets extraction. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
- Loading branch information
1 parent
677ae9c
commit 3199e98
Showing
10 changed files
with
171 additions
and
91 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/LICENSE.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/snippets.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { UsageManagementClient } from "../src/index.js"; | ||
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; | ||
import { setLogLevel } from "@azure/logger"; | ||
import { describe, it } from "vitest"; | ||
|
||
describe("snippets", () => { | ||
it("ReadmeSampleCreateClient_Node", async () => { | ||
const subscriptionId = "00000000-0000-0000-0000-000000000000"; | ||
const client = new UsageManagementClient(new DefaultAzureCredential(), subscriptionId); | ||
}); | ||
|
||
it("ReadmeSampleCreateClient_Browser", async () => { | ||
const subscriptionId = "00000000-0000-0000-0000-000000000000"; | ||
const credential = new InteractiveBrowserCredential({ | ||
tenantId: "<YOUR_TENANT_ID>", | ||
clientId: "<YOUR_CLIENT_ID>", | ||
}); | ||
const client = new UsageManagementClient(credential, subscriptionId); | ||
}); | ||
|
||
it("SetLogLevel", async () => { | ||
setLogLevel("info"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { UsageManagementClient } from "../src/index.js"; | ||
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; | ||
import { setLogLevel } from "@azure/logger"; | ||
import { describe, it } from "vitest"; | ||
|
||
describe("snippets", () => { | ||
it("ReadmeSampleCreateClient_Node", async () => { | ||
const subscriptionId = "00000000-0000-0000-0000-000000000000"; | ||
const client = new UsageManagementClient(new DefaultAzureCredential(), subscriptionId); | ||
}); | ||
|
||
it("ReadmeSampleCreateClient_Browser", async () => { | ||
const subscriptionId = "00000000-0000-0000-0000-000000000000"; | ||
const credential = new InteractiveBrowserCredential({ | ||
tenantId: "<YOUR_TENANT_ID>", | ||
clientId: "<YOUR_CLIENT_ID>", | ||
}); | ||
const client = new UsageManagementClient(credential, subscriptionId); | ||
}); | ||
|
||
it("SetLogLevel", async () => { | ||
setLogLevel("info"); | ||
}); | ||
}); |
Oops, something went wrong.