Skip to content

Commit dc0dfb0

Browse files
authored
[web-pubsub-client] Add more tests (Azure#24259)
### Packages impacted by this PR web-pubsub-client ### Issues associated with this PR ### Describe the problem that is addressed by this PR ### 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?)_ Yes. Add more tests. ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] 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)
1 parent 9007ad1 commit dc0dfb0

19 files changed

+1074
-121
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}\\dist\\index.js",
15+
"preLaunchTask": "tsc: build - tsconfig.json",
16+
"outFiles": [
17+
"${workspaceFolder}/dist-esm/**/*.js"
18+
]
19+
}
20+
]
21+
}

sdk/web-pubsub/web-pubsub-client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"browser": {
99
"buffer": "buffer",
1010
"ws": "./dist-esm/src/ws.browser.js",
11-
"./dist-esm/src/websocket/sendData.js": "./dist-esm/src/websocket/sendData.browser.js"
11+
"./dist-esm/src/websocket/websocketClient.js": "./dist-esm/src/websocket/websocketClient.browser.js"
1212
},
1313
"types": "types/web-pubsub-client.d.ts",
1414
"scripts": {
@@ -73,6 +73,7 @@
7373
"@azure-tools/test-recorder": "^1.0.0",
7474
"@microsoft/api-extractor": "^7.18.11",
7575
"@types/chai": "^4.1.6",
76+
"@types/chai-as-promised": "^7.1.5",
7677
"@types/express": "^4.16.0",
7778
"@types/express-serve-static-core": "^4.17.19",
7879
"@types/jsonwebtoken": "~8.5.0",

sdk/web-pubsub/web-pubsub-client/review/web-pubsub-client.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ export interface WebPubSubClientOptions {
263263
autoRestoreGroups?: boolean;
264264
messageRetryOptions?: WebPubSubRetryOptions;
265265
protocol?: WebPubSubClientProtocol;
266+
reconnectRetryOptions?: WebPubSubRetryOptions;
266267
}
267268

268269
// @public

sdk/web-pubsub/web-pubsub-client/src/models/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export interface WebPubSubClientOptions {
2525
* The retry options for operations like joining group and sending messages
2626
*/
2727
messageRetryOptions?: WebPubSubRetryOptions;
28+
/**
29+
* The retry options for reconnection. Only available when autoReconnect is true.
30+
*/
31+
reconnectRetryOptions?: WebPubSubRetryOptions;
2832
}
2933

3034
/**

0 commit comments

Comments
 (0)