Skip to content

Commit

Permalink
[web-pubsub-client] Add more tests (#24259)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
zackliu authored Dec 19, 2022
1 parent 9007ad1 commit dc0dfb0
Show file tree
Hide file tree
Showing 19 changed files with 1,074 additions and 121 deletions.
15 changes: 7 additions & 8 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions sdk/web-pubsub/web-pubsub-client/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\dist\\index.js",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/dist-esm/**/*.js"
]
}
]
}
3 changes: 2 additions & 1 deletion sdk/web-pubsub/web-pubsub-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"browser": {
"buffer": "buffer",
"ws": "./dist-esm/src/ws.browser.js",
"./dist-esm/src/websocket/sendData.js": "./dist-esm/src/websocket/sendData.browser.js"
"./dist-esm/src/websocket/websocketClient.js": "./dist-esm/src/websocket/websocketClient.browser.js"
},
"types": "types/web-pubsub-client.d.ts",
"scripts": {
Expand Down Expand Up @@ -73,6 +73,7 @@
"@azure-tools/test-recorder": "^1.0.0",
"@microsoft/api-extractor": "^7.18.11",
"@types/chai": "^4.1.6",
"@types/chai-as-promised": "^7.1.5",
"@types/express": "^4.16.0",
"@types/express-serve-static-core": "^4.17.19",
"@types/jsonwebtoken": "~8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export interface WebPubSubClientOptions {
autoRestoreGroups?: boolean;
messageRetryOptions?: WebPubSubRetryOptions;
protocol?: WebPubSubClientProtocol;
reconnectRetryOptions?: WebPubSubRetryOptions;
}

// @public
Expand Down
4 changes: 4 additions & 0 deletions sdk/web-pubsub/web-pubsub-client/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export interface WebPubSubClientOptions {
* The retry options for operations like joining group and sending messages
*/
messageRetryOptions?: WebPubSubRetryOptions;
/**
* The retry options for reconnection. Only available when autoReconnect is true.
*/
reconnectRetryOptions?: WebPubSubRetryOptions;
}

/**
Expand Down
Loading

0 comments on commit dc0dfb0

Please sign in to comment.