-
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.
[web-pubsub] Migrate web-pubsub projects to use snippets extraction (#…
…33188) ### Packages impacted by this PR - @azure/web-pubsub - @azure/web-pubsub-client - @azure/web-pubsub-client-protobuf - @azure/web-pubsub-express ### Issues associated with this PR - #32416 ### Describe the problem that is addressed by this PR Updates all projects under `web-pubsub` 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
9d4b052
commit 649331f
Showing
49 changed files
with
1,084 additions
and
352 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
19 changes: 19 additions & 0 deletions
19
sdk/web-pubsub/web-pubsub-client-protobuf/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,19 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { setLogLevel } from "@azure/logger"; | ||
import { WebPubSubClient } from "@azure/web-pubsub-client"; | ||
import { describe, it } from "vitest"; | ||
import { WebPubSubProtobufReliableProtocol } from "../src/index.js"; | ||
|
||
describe("snippets", () => { | ||
it("ReadmeSampleCreateClient", async () => { | ||
const client = new WebPubSubClient("client-access-url", { | ||
protocol: WebPubSubProtobufReliableProtocol(), | ||
}); | ||
}); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
{ | ||
"references": [ | ||
{ "path": "./tsconfig.src.json" }, | ||
{ "path": "./tsconfig.samples.json" }, | ||
{ "path": "./tsconfig.test.json" } | ||
{ | ||
"path": "./tsconfig.src.json" | ||
}, | ||
{ | ||
"path": "./tsconfig.samples.json" | ||
}, | ||
{ | ||
"path": "./tsconfig.test.json" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
sdk/web-pubsub/web-pubsub-client-protobuf/vitest.browser.config.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,16 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { defineConfig, mergeConfig } from "vitest/config"; | ||
import viteConfig from "../../../vitest.browser.shared.config.ts"; | ||
|
||
export default mergeConfig( | ||
viteConfig, | ||
defineConfig({ | ||
test: { | ||
include: ["dist-test/browser/test/**/*.spec.js"], | ||
testTimeout: 1200000, | ||
hookTimeout: 1200000, | ||
}, | ||
}), | ||
); |
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
Oops, something went wrong.