Skip to content

Commit

Permalink
Fix User-Agent tests (#105)
Browse files Browse the repository at this point in the history
* Fix User-Agent tests

* Bump the version
  • Loading branch information
kpajdzik authored Jan 28, 2019
1 parent 56432e0 commit 2e2abb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"email": "[email protected]",
"url": "https://github.com/Azure/ms-rest-azure-js"
},
"version": "1.3.1",
"version": "1.3.2",
"description": "Isomorphic Azure client runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
"tags": [
"isomorphic",
Expand Down
7 changes: 6 additions & 1 deletion test/azureServiceClientTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,12 @@ describe("AzureServiceClient", () => {

describe("updateOptionsWithDefaultValues()", () => {
function assertOptionEqual(actual: AzureServiceClientOptions, expected: AzureServiceClientOptions) {
const actualUserAgent = actual.userAgent;
let actualUserAgent: string | undefined;
if (typeof actual.userAgent === "string") {
actualUserAgent = actual.userAgent;
} else if (typeof actual.userAgent === "function") {
actualUserAgent = actual.userAgent("");
}
delete actual.userAgent;
delete expected.userAgent;

Expand Down

0 comments on commit 2e2abb0

Please sign in to comment.