Skip to content

Commit 005593b

Browse files
committed
removed unused vars, and changes in tests
1 parent 2956494 commit 005593b

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

codegens/golang/test/unit/convert.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Golang convert function', function () {
2727
expect.fail(null, null, error);
2828
}
2929
expect(snippet).to.be.a('string');
30-
expect(snippet).to.include('url := "https://google.com"');
30+
expect(snippet).to.include('url := "https://google.com/"');
3131
expect(snippet).to.include('method := "GET"');
3232
});
3333
});

codegens/nodejs-native/lib/request.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function makeSnippet (request, indentString, options) {
2020
snippet,
2121
optionsArray = [],
2222
postData = '',
23-
url, host, path, query;
23+
url, host, query;
2424

2525
if (options.ES6_enabled) {
2626
snippet = 'const ';
@@ -134,7 +134,6 @@ function makeSnippet (request, indentString, options) {
134134

135135
url = new sdk.Url(request.url.toString());
136136
host = url.host ? url.host.join('.') : '';
137-
path = url.path ? '/' + url.path.join('/') : '/';
138137
query = url.query ? _.reduce(url.query, (accum, q) => {
139138
accum.push(`${q.key}=${q.value}`);
140139
return accum;

codegens/nodejs-native/test/unit/snippet.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ describe('nodejs-native convert function', function () {
350350
}
351351
expect(snippet).to.be.a('string');
352352
// eslint-disable-next-line quotes
353-
expect(snippet).to.include("'path': '/get?query1=b\\'b&query2=c%22c'");
353+
expect(snippet).to.include("'path': '/get?query1=b%27b&query2=c%22c'");
354354
});
355355
});
356356

0 commit comments

Comments
 (0)